diff --git a/pkgs/build-support/emacs/melpa.nix b/pkgs/build-support/emacs/melpa.nix index 85bc8aa37b3aa..a882145c3f3d7 100644 --- a/pkgs/build-support/emacs/melpa.nix +++ b/pkgs/build-support/emacs/melpa.nix @@ -40,12 +40,10 @@ import ./generic.nix { inherit lib stdenv emacs texinfo writeText gcc; } ({ src = fetchFromGitHub { owner = "melpa"; repo = "package-build"; - rev = "c3c535e93d9dc92acd21ebc4b15016b5c3b90e7d"; - sha256 = "17z0wbqdd6fspbj43yq8biff6wfggk74xgnaf1xx6ynsp1i74is5"; + rev = "c48aa078c01b4f07b804270c4583a0a58ffea1c0"; + sha256 = "sha256-MzPj375upIiYXdQR+wWXv3A1zMqbSrZlH0taLuxx/1M="; }; - patches = [ ./package-build-dont-use-mtime.patch ]; - dontConfigure = true; dontBuild = true; diff --git a/pkgs/build-support/emacs/melpa2nix.el b/pkgs/build-support/emacs/melpa2nix.el index 72667dea652c1..6064b0edc4eaa 100644 --- a/pkgs/build-support/emacs/melpa2nix.el +++ b/pkgs/build-support/emacs/melpa2nix.el @@ -12,17 +12,12 @@ (setq large-file-warning-threshold nil) (defun melpa2nix-build-package-1 (rcp version commit) - (let ((source-dir (package-recipe--working-tree rcp))) - (unwind-protect - (let ((files (package-build-expand-files-spec rcp t))) - (cond - ((= (length files) 1) - (package-build--build-single-file-package - rcp version commit files source-dir)) - ((> (length files) 1) - (package-build--build-multi-file-package - rcp version commit files source-dir)) - (t (error "Unable to find files matching recipe patterns"))))))) + (oset rcp version version) + (oset rcp commit commit) + (oset rcp time 0) + (let ((package-build-checkout-function #'ignore) + (package-build-cleanup-function #'ignore)) + (package-build--package rcp))) (defun melpa2nix-build-package () (if (not noninteractive) diff --git a/pkgs/build-support/emacs/package-build-dont-use-mtime.patch b/pkgs/build-support/emacs/package-build-dont-use-mtime.patch deleted file mode 100644 index fe94de57a3002..0000000000000 --- a/pkgs/build-support/emacs/package-build-dont-use-mtime.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/package-build.el b/package-build.el -index e572045..9eb0f82 100644 ---- a/package-build.el -+++ b/package-build.el -@@ -415,7 +415,7 @@ (defun package-build--write-pkg-file (desc dir) - (princ ";; Local Variables:\n;; no-byte-compile: t\n;; End:\n" - (current-buffer))))) - --(defun package-build--create-tar (name version directory mtime) -+(defun package-build--create-tar (name version directory) - "Create a tar file containing the contents of VERSION of package NAME. - DIRECTORY is a temporary directory that contains the directory - that is put in the tarball. MTIME is used as the modification -@@ -434,7 +434,7 @@ (defun package-build--create-tar (name version directory mtime) - ;; prevent a reproducable tarball as described at - ;; https://reproducible-builds.org/docs/archives. - "--sort=name" -- (format "--mtime=@%d" mtime) -+ "--mtime=@0" - "--owner=0" "--group=0" "--numeric-owner" - "--pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime")) - (when (and package-build-verbose noninteractive) -@@ -848,12 +848,11 @@ (defun package-build--build-multi-file-package (rcp version commit files source- - (package-build--desc-from-library - name version commit files 'tar) - (error "%s[-pkg].el matching package name is missing" -- name)))) -- (mtime (package-build--get-commit-time rcp commit))) -+ name))))) - (package-build--copy-package-files files source-dir target) - (package-build--write-pkg-file desc target) - (package-build--generate-info-files files source-dir target) -- (package-build--create-tar name version tmp-dir mtime) -+ (package-build--create-tar name version tmp-dir) - (package-build--write-pkg-readme name files source-dir) - (package-build--write-archive-entry desc)) - (delete-directory tmp-dir t nil)))) --- -2.37.2 -