[guix] Make x86_64-w64-mingw32 builds reproducible
Summary:
- Set "SetDateSave off" in NSIS script
From https://nsis.sourceforge.io/Docs/Chapter4.html#flags
"This command sets the file date/time saving flag which is used by the
File command to determine whether or not to save the last write date and
time of the file, so that it can be restored on installation. Valid
flags are 'on' and 'off'. 'on' is the default."
- Make ZIPs deterministic by reseting file modification times to SOURCE_DATE_EPOCH using touch(1) (Reference: https://reproducible-builds.org/docs/archives/)
This is a partial backport of core#17595
https://github.com/bitcoin/bitcoin/pull/17595/commits/acf4b3b3b5accf60a19441a0298ef27001b78e72
Test Plan:
Run the build twice and compare the hashes
contrib/guix/guix-clean HOSTS="x86_64-w64-mingw32" contrib/guix/guix-build &> ../guix-win.log1
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D15646