From 5fe16f0bf212808d377bd2d65e01c74f425db408 Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Fri, 31 Jan 2025 18:35:59 +0100 Subject: [PATCH] Pass custom DEP_OPTS to guix-build --- contrib/guix/guix-build | 4 +++- contrib/guix/libexec/build.sh | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/contrib/guix/guix-build b/contrib/guix/guix-build index 2ea574fe4b98c..e278032220ab1 100755 --- a/contrib/guix/guix-build +++ b/contrib/guix/guix-build @@ -296,7 +296,7 @@ mkdir -p "$OUTDIR_BASE" # Download the depends sources now as we won't have internet access in the build # container for host in $HOSTS; do - make -C "${PWD}/depends" -j"$JOBS" download-"$(host_to_commonname "$host")" ${V:+V=1} ${SOURCES_PATH:+SOURCES_PATH="$SOURCES_PATH"} + make -C "${PWD}/depends" -j"$JOBS" download-"$(host_to_commonname "$host")" ${DEP_OPTS:+"$DEP_OPTS"} ${V:+V=1} ${SOURCES_PATH:+SOURCES_PATH="$SOURCES_PATH"} done # Usage: outdir_for_host HOST SUFFIX @@ -361,6 +361,7 @@ INFO: Building ${VERSION:?not set} for platform triple ${HOST:?not set}: ...bind-mounted in container to: '$(DISTSRC_BASE=/distsrc-base && distsrc_for_host "$HOST")' ...outputting in: '$(outdir_for_host "$HOST")' ...bind-mounted in container to: '$(OUTDIR_BASE=/outdir-base && outdir_for_host "$HOST")' + DEP_OPTS: ${DEP_OPTS} ADDITIONAL FLAGS (if set) ADDITIONAL_GUIX_COMMON_FLAGS: ${ADDITIONAL_GUIX_COMMON_FLAGS} ADDITIONAL_GUIX_ENVIRONMENT_FLAGS: ${ADDITIONAL_GUIX_ENVIRONMENT_FLAGS} @@ -462,6 +463,7 @@ EOF DISTSRC="$(DISTSRC_BASE=/distsrc-base && distsrc_for_host "$HOST")" \ OUTDIR="$(OUTDIR_BASE=/outdir-base && outdir_for_host "$HOST")" \ DIST_ARCHIVE_BASE=/outdir-base/dist-archive \ + DEP_OPTS="$DEP_OPTS" \ bash -c "cd /bitcoin && bash contrib/guix/libexec/build.sh" ) diff --git a/contrib/guix/libexec/build.sh b/contrib/guix/libexec/build.sh index 6c252e787022a..daac5e36b3c08 100755 --- a/contrib/guix/libexec/build.sh +++ b/contrib/guix/libexec/build.sh @@ -167,6 +167,7 @@ export TZ="UTC" # Build the depends tree, overriding variables that assume multilib gcc make -C depends --jobs="$JOBS" HOST="$HOST" \ + ${DEP_OPTS:+"$DEP_OPTS"} \ ${V:+V=1} \ ${SOURCES_PATH+SOURCES_PATH="$SOURCES_PATH"} \ ${BASE_CACHE+BASE_CACHE="$BASE_CACHE"} \