Skip to content

Commit

Permalink
emacs.pkgs.melpaBuild: package-build: 2018-10-05 -> 2021-04-13
Browse files Browse the repository at this point in the history
I think this is due an update.  I've chosen to update to the latest
version that has been merged into Melpa.

Unfortunately we now need to hack around it trying to run VCS
commands.

My Emacs configuration with thirty-something leaf packages seems fine
after the rebuild.
  • Loading branch information
alyssais committed Jul 6, 2021
1 parent 302d7c6 commit 9140d4b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ in {
lib.nameValuePair ename (
self.callPackage ({ melpaBuild, fetchurl, ... }@pkgargs:
melpaBuild {
inherit pname;
ename = ename;
inherit pname ename commit;
version = if isNull version then "" else
lib.concatStringsSep "." (map toString version);
# TODO: Broken should not result in src being null (hack to avoid eval errors)
Expand Down
6 changes: 3 additions & 3 deletions pkgs/build-support/emacs/melpa.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ import ./generic.nix { inherit lib stdenv emacs texinfo writeText; } ({
packageBuild = fetchFromGitHub {
owner = "melpa";
repo = "package-build";
rev = "0a22c3fbbf661822ec1791739953b937a12fa623";
sha256 = "0dpy5p34il600sc8ic5jdgb3glya9si3lrvhxab0swks8fdydjgs";
rev = "047801d301a73d4932f33f768d94a8ed26b8d524";
sha256 = "0ygzkpg7xc3mjjbxg1kcyz6fwbkb0prvca499f0ffmhfaiv28h59";
};

elpa2nix = ./elpa2nix.el;
Expand Down Expand Up @@ -70,7 +70,7 @@ import ./generic.nix { inherit lib stdenv emacs texinfo writeText; } ({
-L "$NIX_BUILD_TOP/package-build" \
-l "$melpa2nix" \
-f melpa2nix-build-package \
$ename $version
$ename $version $commit
runHook postBuild
'';
Expand Down
5 changes: 4 additions & 1 deletion pkgs/build-support/emacs/melpa2nix.el
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@
(if (not noninteractive)
(error "`melpa2nix-build-package' is to be used only with -batch"))
(pcase command-line-args-left
(`(,package ,version)
(`(,package ,version ,commit)
;; Monkey-patch package-build so it doesn't shell out to git/hg.
(defun package-build--get-commit (&rest _)
commit)
(package-build--package (package-recipe-lookup package) version))))

0 comments on commit 9140d4b

Please sign in to comment.