Browse Source

elpa2nix: fix packages with DOS line endings

nixos-19.03
Thomas Tuegel 7 years ago
parent
commit
9dfd9fe0bf
  1. 11
      pkgs/build-support/emacs/elpa2nix.el

11
pkgs/build-support/emacs/elpa2nix.el

@ -21,7 +21,10 @@
(defun elpa2nix-install-file (file)
"Install a package from a file.
The file can either be a tar file or an Emacs Lisp file."
(with-temp-buffer
(insert-file-contents-literally file)
(when (string-match "\\.tar\\'" file) (tar-mode))
(elpa2nix-install-from-buffer)))
(let ((is-tar (string-match "\\.tar\\'" file)))
(with-temp-buffer
(if is-tar
(insert-file-contents-literally file)
(insert-file-contents file))
(when is-tar (tar-mode))
(elpa2nix-install-from-buffer))))

Loading…
Cancel
Save