diff options
author | laanwj <126646+laanwj@users.noreply.github.com> | 2022-03-07 11:08:46 +0100 |
---|---|---|
committer | laanwj <126646+laanwj@users.noreply.github.com> | 2022-03-07 11:08:46 +0100 |
commit | 6833aceac97dd170970338f0bde5029f7d7aaa03 (patch) | |
tree | fee78e9ab43cdc8be44a1a145c7432f93ad25d30 /contrib/guix/libexec | |
parent | 3b08427b58007351cc94ab099123af13ef590e56 (diff) |
build: Move guix time machine to prelude
This deduplicates some code, and enforces consistency of the time
machine configuration between scripts.
Diffstat (limited to 'contrib/guix/libexec')
-rw-r--r-- | contrib/guix/libexec/prelude.bash | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/contrib/guix/libexec/prelude.bash b/contrib/guix/libexec/prelude.bash index 1f287e9bbb..086df48fbe 100644 --- a/contrib/guix/libexec/prelude.bash +++ b/contrib/guix/libexec/prelude.bash @@ -46,6 +46,22 @@ exit 1 fi ################ +# Execute "$@" in a pinned, possibly older version of Guix, for reproducibility +# across time. +time-machine() { + # shellcheck disable=SC2086 + guix time-machine --url=https://git.savannah.gnu.org/git/guix.git \ + --commit=ae03f401381e956c4c41b4cf495cbde964fa43d0 \ + --cores="$JOBS" \ + --keep-failed \ + --fallback \ + ${SUBSTITUTE_URLS:+--substitute-urls="$SUBSTITUTE_URLS"} \ + ${ADDITIONAL_GUIX_COMMON_FLAGS} ${ADDITIONAL_GUIX_TIMEMACHINE_FLAGS} \ + -- "$@" +} + + +################ # Set common variables ################ |