diff --git a/pkgs/build-support/emacs/melpa.nix b/pkgs/build-support/emacs/melpa.nix index 8fd2a00b50a8..ae228f48b025 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 f1309fc0d57b..babca25277c8 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)))))