diff options
author | Thomas Tuegel <ttuegel@gmail.com> | 2016-01-16 17:20:06 -0600 |
---|---|---|
committer | Thomas Tuegel <ttuegel@gmail.com> | 2016-01-18 15:29:19 -0600 |
commit | decb5802c91915814fc6551442cd3f586a78de30 (patch) | |
tree | c27b785a10bf89000419d00e4781160e724326f7 /pkgs/build-support/emacs/melpa2nix.el | |
parent | 1724a07e2e06a7de4c30fc0983dfd4411771183e (diff) | |
download | nixpkgs-decb5802c91915814fc6551442cd3f586a78de30.tar nixpkgs-decb5802c91915814fc6551442cd3f586a78de30.tar.gz nixpkgs-decb5802c91915814fc6551442cd3f586a78de30.tar.bz2 nixpkgs-decb5802c91915814fc6551442cd3f586a78de30.tar.lz nixpkgs-decb5802c91915814fc6551442cd3f586a78de30.tar.xz nixpkgs-decb5802c91915814fc6551442cd3f586a78de30.tar.zst nixpkgs-decb5802c91915814fc6551442cd3f586a78de30.zip |
elpaBuild: factor out package installation
Building packages requires package-build.el from Melpa, but installing packages only requires package.el. Packages from ELPA are already built, so there is no need to involve package-build.el.
Diffstat (limited to 'pkgs/build-support/emacs/melpa2nix.el')
-rw-r--r-- | pkgs/build-support/emacs/melpa2nix.el | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/pkgs/build-support/emacs/melpa2nix.el b/pkgs/build-support/emacs/melpa2nix.el index fb35fc68125..3cd5bbdb954 100644 --- a/pkgs/build-support/emacs/melpa2nix.el +++ b/pkgs/build-support/emacs/melpa2nix.el @@ -6,14 +6,6 @@ (setq package-build-working-dir (expand-file-name ".") package-build-archive-dir (expand-file-name ".")) -(defun melpa2nix-install-package () - (if (not noninteractive) - (error "`melpa2nix-install-package' is to be used only with -batch")) - (pcase command-line-args-left - (`(,archive ,elpa) - (progn (setq package-user-dir elpa) - (melpa2nix-install-file archive))))) - (defun melpa2nix-build-package () (if (not noninteractive) (error "`melpa2nix-build-package' is to be used only with -batch")) @@ -48,20 +40,3 @@ (time-to-seconds (time-since start-time)) (current-time-string)) (princ (format "%s\n" archive-file))))) - -(defun melpa2nix-install-from-buffer () - "Install a package from the current buffer." - (let ((pkg-desc (if (derived-mode-p 'tar-mode) - (package-tar-file-info) - (package-buffer-info)))) - ;; Install the package itself. - (package-unpack pkg-desc) - pkg-desc)) - -(defun melpa2nix-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)) - (melpa2nix-install-from-buffer))) |