aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2021-05-29 01:28:10 -0400
committerCarl Dong <contact@carldong.me>2021-06-05 11:21:11 -0400
commit20d9535e1bf981a37f39f171ad72f67cdb1e6919 (patch)
tree1c4ea46c88c3d811867cc5b78c50eca64feed335 /gnu/packages/patches
parent9da90938c63208b7721276f8cefcdac82ba765f2 (diff)
downloadguix-20d9535e1bf981a37f39f171ad72f67cdb1e6919.tar
guix-20d9535e1bf981a37f39f171ad72f67cdb1e6919.tar.gz
gnu: nsis: Respect SOURCE-DATE-EPOCH for reproducibility
* gnu/packages/patches/nsis-source-date-epoch.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/installers.scm (make-nsis)[source]: Apply it.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/nsis-source-date-epoch.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/gnu/packages/patches/nsis-source-date-epoch.patch b/gnu/packages/patches/nsis-source-date-epoch.patch
new file mode 100644
index 0000000000..744c2a8011
--- /dev/null
+++ b/gnu/packages/patches/nsis-source-date-epoch.patch
@@ -0,0 +1,23 @@
+Honour SOURCE_DATE_EPOCH for VERSION default
+
+Merged upstream as cd3f1024a37a332f1d4fa96a817ca80dfa2a478c, but not yet in a
+release. GitHub PR: https://github.com/kichik/nsis/pull/13
+
+Python snippet from: https://reproducible-builds.org/docs/source-date-epoch/#python
+
+
+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()
+