summary refs log tree commit diff
diff options
context:
space:
mode:
authorThomas Tuegel <ttuegel@gmail.com>2016-01-15 17:53:54 -0600
committerThomas Tuegel <ttuegel@gmail.com>2016-01-18 15:29:16 -0600
commit4b2303b8c9758e9bff119d4dfe7bc8b039a73ef1 (patch)
tree7a00425bb9214525f332ddebd6f29bdac4bd6f0f
parent61436c90e291145e829ae23dcf3bf742126c9eeb (diff)
downloadnixpkgs-4b2303b8c9758e9bff119d4dfe7bc8b039a73ef1.tar
nixpkgs-4b2303b8c9758e9bff119d4dfe7bc8b039a73ef1.tar.gz
nixpkgs-4b2303b8c9758e9bff119d4dfe7bc8b039a73ef1.tar.bz2
nixpkgs-4b2303b8c9758e9bff119d4dfe7bc8b039a73ef1.tar.lz
nixpkgs-4b2303b8c9758e9bff119d4dfe7bc8b039a73ef1.tar.xz
nixpkgs-4b2303b8c9758e9bff119d4dfe7bc8b039a73ef1.tar.zst
nixpkgs-4b2303b8c9758e9bff119d4dfe7bc8b039a73ef1.zip
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.
-rw-r--r--pkgs/build-support/emacs/melpa.nix2
-rw-r--r--pkgs/build-support/emacs/melpa2nix.el6
2 files changed, 5 insertions, 3 deletions
diff --git a/pkgs/build-support/emacs/melpa.nix b/pkgs/build-support/emacs/melpa.nix
index 8fd2a00b50a..ae228f48b02 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 f1309fc0d57..babca25277c 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)))))