all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 744c2a8011adc7cafa47a47ab037a542848602d3 724 bytes (raw)
name: gnu/packages/patches/nsis-source-date-epoch.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
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()
 

debug log:

solving 744c2a8011 ...
found 744c2a8011 in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.