diff options
author | Thomas Tuegel <ttuegel@gmail.com> | 2016-01-15 17:53:54 -0600 |
---|---|---|
committer | Thomas Tuegel <ttuegel@gmail.com> | 2016-01-18 15:29:16 -0600 |
commit | 4b2303b8c9758e9bff119d4dfe7bc8b039a73ef1 (patch) | |
tree | 7a00425bb9214525f332ddebd6f29bdac4bd6f0f /pkgs/build-support/emacs | |
parent | 61436c90e291145e829ae23dcf3bf742126c9eeb (diff) |
melpaBuild: get Emacs package name from recipe
When building a package from a Melpa recipe file, get the Emacs package name from the recipe. Nix is more restrictive about packages names than Emacs, so the Nix name for a package is sometimes different.
Diffstat (limited to 'pkgs/build-support/emacs')
-rw-r--r-- | pkgs/build-support/emacs/melpa.nix | 2 | ||||
-rw-r--r-- | pkgs/build-support/emacs/melpa2nix.el | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/pkgs/build-support/emacs/melpa.nix b/pkgs/build-support/emacs/melpa.nix index 8fd2a00b50a85..ae228f48b0258 100644 --- a/pkgs/build-support/emacs/melpa.nix +++ b/pkgs/build-support/emacs/melpa.nix @@ -54,7 +54,7 @@ import ./generic.nix { inherit lib stdenv emacs texinfo; } ({ else '' -f melpa2nix-build-package-from-recipe \ - ${pname} ${version} ${recipeFile} + ${recipeFile} ${version} ''} runHook postBuild diff --git a/pkgs/build-support/emacs/melpa2nix.el b/pkgs/build-support/emacs/melpa2nix.el index f1309fc0d57b2..babca25277c8f 100644 --- a/pkgs/build-support/emacs/melpa2nix.el +++ b/pkgs/build-support/emacs/melpa2nix.el @@ -25,8 +25,10 @@ (if (not noninteractive) (error "`melpa2nix-build-package' is to be used only with -batch")) (pcase command-line-args-left - (`(,package ,version ,recipe-file) - (let* ((rcp (cdr (package-build--read-from-file recipe-file))) + (`(,recipe-file ,version) + (let* ((recipe (package-build--read-from-file recipe-file)) + (rcp (cdr recipe)) + (package (car recipe)) (files (package-build--config-file-list rcp))) (melpa2nix-package-build-archive package version files))))) |