nmh: make reproducible
This commit is contained in:
parent
3c17721be9
commit
d2a3e5e04b
@ -26,6 +26,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-ShAdinvBA7guVBhjqTelBRiUzyo5KqHcawlQS9kXtqs=";
|
||||
};
|
||||
|
||||
patches = [ ./reproducible-build-date.patch ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace \
|
||||
sbr/arglist.c \
|
||||
|
15
pkgs/by-name/nm/nmh/reproducible-build-date.patch
Normal file
15
pkgs/by-name/nm/nmh/reproducible-build-date.patch
Normal file
@ -0,0 +1,15 @@
|
||||
Index: config/version.sh
|
||||
===================================================================
|
||||
--- a/config/version.sh
|
||||
+++ b/config/version.sh
|
||||
@@ -11,9 +11,9 @@
|
||||
git=" `git -C $srcdir describe --long --dirty`"
|
||||
else
|
||||
git=
|
||||
fi
|
||||
-date="`TZ=GMT0 date +'%Y-%m-%d %T'` +0000"
|
||||
+date="$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d)"
|
||||
|
||||
cat <<E
|
||||
char *version_str = "nmh-$version$git built $date on $host";
|
||||
char *version_num = "nmh-$version";
|
Loading…
x
Reference in New Issue
Block a user