package-build: don't use mtime when creating tarballs
This commit is contained in:
parent
b82454134d
commit
eff9931ef8
2 changed files with 58 additions and 5 deletions
|
@ -35,13 +35,26 @@ import ./generic.nix { inherit lib stdenv emacs texinfo writeText gcc; } ({
|
||||||
then pname
|
then pname
|
||||||
else ename;
|
else ename;
|
||||||
|
|
||||||
packageBuild = fetchFromGitHub {
|
packageBuild = stdenv.mkDerivation {
|
||||||
|
name = "package-build";
|
||||||
|
src = fetchFromGitHub {
|
||||||
owner = "melpa";
|
owner = "melpa";
|
||||||
repo = "package-build";
|
repo = "package-build";
|
||||||
rev = "c3c535e93d9dc92acd21ebc4b15016b5c3b90e7d";
|
rev = "c3c535e93d9dc92acd21ebc4b15016b5c3b90e7d";
|
||||||
sha256 = "17z0wbqdd6fspbj43yq8biff6wfggk74xgnaf1xx6ynsp1i74is5";
|
sha256 = "17z0wbqdd6fspbj43yq8biff6wfggk74xgnaf1xx6ynsp1i74is5";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [ ./package-build-dont-use-mtime.patch ];
|
||||||
|
|
||||||
|
dontConfigure = true;
|
||||||
|
dontBuild = true;
|
||||||
|
|
||||||
|
installPhase = "
|
||||||
|
mkdir -p $out
|
||||||
|
cp -r * $out
|
||||||
|
";
|
||||||
|
};
|
||||||
|
|
||||||
elpa2nix = ./elpa2nix.el;
|
elpa2nix = ./elpa2nix.el;
|
||||||
melpa2nix = ./melpa2nix.el;
|
melpa2nix = ./melpa2nix.el;
|
||||||
|
|
||||||
|
|
40
pkgs/build-support/emacs/package-build-dont-use-mtime.patch
Normal file
40
pkgs/build-support/emacs/package-build-dont-use-mtime.patch
Normal file
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue