On Wed, 2026-08-05 at 22:03 +0200, Hugo Buddelmeijer via Development of
GNU Guix and the GNU System distribution. wrote:
> Hi Guix,
> 
> Can we mock the date/time when we run the guix build process?
> 
> Some packages might only build properly within specific time ranges,
> so 
> it would be great if we can specify the 'build time'.  Either to get 
> such package to build, or to test reproducibility in general.
> 
> 
> Case in point, python-astropy uses the leap second tables provided by
> python-astropy-iers-data.  Leap seconds are announced 6 months in 
> advance, and astropy downloads new tables when it deems the local
> tables 
> are about to be outdated.
> 
> Unfortunately, the python-astropy-iers-data package has not been 
> refreshed on time, and now python-astropy does not build anymore (on 
> master).
> 
> But python-astropy does build when you do this:
> 
> sudo herd stop guix-daemon
> sudo date --set="20 JUL 2026 18:00:00"
> sudo guix-daemon
> guix build python-astropy
> 
> While this particular problem can be fixed in the future (by
> disabling 
> the download [1]), it cannot be fixed 'in the past', so you cannot
> build 
> old python-astropy packages with `guix time-machine`.
> 
> (It might be that only this latest python-astropy version is
> affected, 
> limiting the scope, but that's besides the point.)
> 
> 
> While the above commands work, setting your system clock probably has
> quite some side effects [2].
> 
> So I'm wondering: is there an easier way to set the date/time for the
> build process?  Or for `guix shell` in general?
> 
> Hugo
> 

Hi Hugo,

You can use a virtual build machine for this purpose. See
https://guix.gnu.org/manual/1.5.0/en/html_node/Virtualization-Services.html#build_002dvm

Have a nice day,
Noé

> 
> [1] Disabling the downloading of leap second tables: 
> https://codeberg.org/guix/guix/pulls/10344
> 
> [2] While trying to sent this message, everything started to break
> down. 
>   SMTP seemed to refuse the message, WiFi driver crashed, then other 
> random things stopped working like opening a shell, so I reisub'ed.
> 

  • mocking the date/... Development of GNU Guix and the GNU System distribution.
    • Re: mocking ... Noé Lopez
      • Re: mock... Development of GNU Guix and the GNU System distribution.
        • Re: ... Development of GNU Guix and the GNU System distribution.
    • Re: mocking ... Ian Eure
      • Re: mock... Development of GNU Guix and the GNU System distribution.

Reply via email to