aboutsummaryrefslogtreecommitdiff
path: root/contrib/guix/patches
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2021-01-14 18:10:16 -0500
committerCarl Dong <contact@carldong.me>2021-01-17 18:43:58 -0500
commita91c46c57d88fc399432afab7bb0fb14c3e490a7 (patch)
treeee16eed2f47d8576e76e20867280378354be888b /contrib/guix/patches
parent7acda55c4fa611481979a41dfd5ca016bb535409 (diff)
downloadbitcoin-a91c46c57d88fc399432afab7bb0fb14c3e490a7.tar.xz
guix: Make nsis reproducible by respecting SOURCE-DATE-EPOCH
When building nsis, if VERSION is not specified, it defaults to cvs_version which is non-deterministic as it includes the current date. This patches nsis to default to SOURCE_DATE_EPOCH if it exists so that nsis is reproducible. Upstream change: https://github.com/kichik/nsis/pull/13
Diffstat (limited to 'contrib/guix/patches')
-rw-r--r--contrib/guix/patches/nsis-SConstruct-sde-support.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/contrib/guix/patches/nsis-SConstruct-sde-support.patch b/contrib/guix/patches/nsis-SConstruct-sde-support.patch
new file mode 100644
index 0000000000..5edf1b7c8e
--- /dev/null
+++ b/contrib/guix/patches/nsis-SConstruct-sde-support.patch
@@ -0,0 +1,15 @@
+diff --git a/SConstruct b/SConstruct
+index e8252c9..41786f2 100755
+--- a/SConstruct
++++ b/SConstruct
+@@ -95,8 +95,8 @@ default_doctype = 'html'
+ if defenv.WhereIs('hhc', os.environ['PATH']):
+ default_doctype = 'chm'
+
+-from time import strftime, gmtime
+-cvs_version = strftime('%d-%b-%Y.cvs', gmtime())
++import time
++cvs_version = time.strftime('%d-%b-%Y.cvs', time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))))
+
+ opts = Variables()
+