@@ -16,9 +16,11 @@ SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(git log --format=%at -1)}"
16
16
# Execute "$@" in a pinned, possibly older version of Guix, for reproducibility
17
17
# across time.
18
18
time-machine () {
19
+ # shellcheck disable=SC2086
19
20
guix time-machine --url=https://github.com/dongcarl/guix.git \
20
21
--commit=b066c25026f21fb57677aa34692a5034338e7ee3 \
21
22
--max-jobs=" $MAX_JOBS " \
23
+ ${SUBSTITUTE_URLS: +--substitute-urls=" $SUBSTITUTE_URLS " } \
22
24
-- " $@ "
23
25
}
24
26
@@ -100,6 +102,16 @@ for host in ${HOSTS=x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu riscv
100
102
# make the downloaded depends sources available to it. The sources
101
103
# should have been downloaded prior to this invocation.
102
104
#
105
+ # ${SUBSTITUTE_URLS:+--substitute-urls="$SUBSTITUTE_URLS"}
106
+ #
107
+ # fetch substitute from SUBSTITUTE_URLS if they are
108
+ # authorized
109
+ #
110
+ # Depending on the user's security model, it may be desirable to use
111
+ # substitutes (pre-built packages) from servers that the user trusts.
112
+ # Please read the README.md in the same directory as this file for
113
+ # more information.
114
+ #
103
115
# shellcheck disable=SC2086
104
116
time-machine environment --manifest=" ${PWD} /contrib/guix/manifest.scm" \
105
117
--container \
@@ -110,6 +122,7 @@ for host in ${HOSTS=x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu riscv
110
122
${SOURCES_PATH: +--share=" $SOURCES_PATH " } \
111
123
${ADDITIONAL_GUIX_ENVIRONMENT_FLAGS} \
112
124
--max-jobs=" $MAX_JOBS " \
125
+ ${SUBSTITUTE_URLS: +--substitute-urls=" $SUBSTITUTE_URLS " } \
113
126
-- env HOST=" $host " \
114
127
MAX_JOBS=" $MAX_JOBS " \
115
128
SOURCE_DATE_EPOCH=" ${SOURCE_DATE_EPOCH:? unable to determine value} " \
0 commit comments