diff options
author | Anderson Torres <torres.anderson.85@protonmail.com> | 2022-09-20 21:14:54 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-20 21:14:54 -0300 |
commit | 0502262f1c1aa71838b9c4f491cf89d0fcc88d43 (patch) | |
tree | 8183f4c48ff99cc39a129d9bff77c86ef864093c /pkgs/build-support | |
parent | 96880ad8967b3eb523c9a517d6a4e86fa28526ad (diff) | |
parent | eff9931ef8ba4f26a3551c8a1c076918b0deb54c (diff) |
Merge pull request #191769 from osama-re/melpa-fetchers-v2
emacs: fix emacs packages with new fetchers
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/emacs/melpa.nix | 23 | ||||
-rw-r--r-- | pkgs/build-support/emacs/package-build-dont-use-mtime.patch | 40 |
2 files changed, 58 insertions, 5 deletions
diff --git a/pkgs/build-support/emacs/melpa.nix b/pkgs/build-support/emacs/melpa.nix index 924e6d95f14a8..85bc8aa37b3aa 100644 --- a/pkgs/build-support/emacs/melpa.nix +++ b/pkgs/build-support/emacs/melpa.nix @@ -35,11 +35,24 @@ import ./generic.nix { inherit lib stdenv emacs texinfo writeText gcc; } ({ then pname else ename; - packageBuild = fetchFromGitHub { - owner = "melpa"; - repo = "package-build"; - rev = "35017a2d87376c70c3239f48bdbac7efca85aa10"; - sha256 = "07hdmam85452v4r2vaabj1qfyami1hgbh0jgj9dcwbkpr0y1gvqj"; + packageBuild = stdenv.mkDerivation { + name = "package-build"; + src = fetchFromGitHub { + owner = "melpa"; + repo = "package-build"; + rev = "c3c535e93d9dc92acd21ebc4b15016b5c3b90e7d"; + sha256 = "17z0wbqdd6fspbj43yq8biff6wfggk74xgnaf1xx6ynsp1i74is5"; + }; + + patches = [ ./package-build-dont-use-mtime.patch ]; + + dontConfigure = true; + dontBuild = true; + + installPhase = " + mkdir -p $out + cp -r * $out + "; }; elpa2nix = ./elpa2nix.el; diff --git a/pkgs/build-support/emacs/package-build-dont-use-mtime.patch b/pkgs/build-support/emacs/package-build-dont-use-mtime.patch new file mode 100644 index 0000000000000..fe94de57a3002 --- /dev/null +++ b/pkgs/build-support/emacs/package-build-dont-use-mtime.patch @@ -0,0 +1,40 @@ +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 + |