mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
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.
This commit is contained in:
parent
9da90938c6
commit
20d9535e1b
3 changed files with 26 additions and 1 deletions
23
gnu/packages/patches/nsis-source-date-epoch.patch
Normal file
23
gnu/packages/patches/nsis-source-date-epoch.patch
Normal file
|
@ -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()
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue