Hi Hugo,
Hugo Buddelmeijer via "Development of GNU Guix and the GNU System
distribution." <[email protected]> writes:
Can we mock the date/time when we run the guix build process?
Yes, though it’s cumbersome. The `faketime' and `datefudge'
programs
do exactly this, and many packages with time-sensitive builds use
them. NSS is a good example, the tests fail if they’re run after
the
expiration of X.509 certificates included with the source, so the
time
must be adjusted back for reproducability.
The cumbersome parts are:
- faketime doesn’t work on 32-bit systems, so packages must
choose
either faketime or datefudge, depending on the build target.
- They must spawn the program the time is adjusted for, ex:
`faketime
make check'. Which means you have to mess with the
build-system’s
phases to make it work.
Better support for this within the package definition itself would
be
most welcome.
-- Ian