mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Merge bitcoin/bitcoin#24489: build: Move guix time machine to prelude
6833aceac9build: Move guix time machine to prelude (laanwj) Pull request description: This deduplicates some code, and enforces consistency of the time machine configuration between scripts. ACKs for top commit: achow101: ACK6833aceac9dongcarl: ACK6833aceac9Tree-SHA512: c02ded154cdb982293101986ef863d46554fc428eb5617bee0288dbef0543f994de5044123ac9958e455d0d24276a1c4512149a10dd1efaca8677c8f6b74b0a9
This commit is contained in:
commit
bda692d246
3 changed files with 16 additions and 29 deletions
|
|
@ -234,21 +234,6 @@ host_to_commonname() {
|
||||||
# Determine the reference time used for determinism (overridable by environment)
|
# Determine the reference time used for determinism (overridable by environment)
|
||||||
SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(git -c log.showSignature=false log --format=%at -1)}"
|
SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(git -c log.showSignature=false log --format=%at -1)}"
|
||||||
|
|
||||||
# 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} \
|
|
||||||
-- "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# Precious directories are those which should not be cleaned between successive
|
# Precious directories are those which should not be cleaned between successive
|
||||||
# guix builds
|
# guix builds
|
||||||
depends_precious_dir_names='SOURCES_PATH BASE_CACHE SDK_PATH'
|
depends_precious_dir_names='SOURCES_PATH BASE_CACHE SDK_PATH'
|
||||||
|
|
|
||||||
|
|
@ -222,20 +222,6 @@ JOBS="${JOBS:-$(nproc)}"
|
||||||
# Determine the reference time used for determinism (overridable by environment)
|
# Determine the reference time used for determinism (overridable by environment)
|
||||||
SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(git -c log.showSignature=false log --format=%at -1)}"
|
SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(git -c log.showSignature=false log --format=%at -1)}"
|
||||||
|
|
||||||
# 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} \
|
|
||||||
-- "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Make sure an output directory exists for our builds
|
# Make sure an output directory exists for our builds
|
||||||
OUTDIR_BASE="${OUTDIR_BASE:-${VERSION_BASE}/output}"
|
OUTDIR_BASE="${OUTDIR_BASE:-${VERSION_BASE}/output}"
|
||||||
mkdir -p "$OUTDIR_BASE"
|
mkdir -p "$OUTDIR_BASE"
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,22 @@ EOF
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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
|
# Set common variables
|
||||||
################
|
################
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue