summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-04-24 09:59:54 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-04-24 10:32:40 -0400
commit51f95d4e6496d299d4852d7659213fdcd8e131bc (patch)
tree8c8b16d435315a4447c08c2ca283d6091f884381
parent533359cea8fcc305e288ef67be5fa6362e8100e3 (diff)
guix-install.sh: Allow overriding the Guix binary source.
This is useful for example for testing release candidates not yet uploaded to the FTP, or for testing manually downloaded images from the CI. * etc/guix-install.sh (main)[GUIX_BINARY_FILE_NAME]: When this variable is defined, use it as the file name of a Guix binary, instead of automatically retrieving the latest archive from the FTP.
-rwxr-xr-xetc/guix-install.sh14
1 files changed, 11 insertions, 3 deletions
diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 949ef7719fc..168bf7234e4 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -554,10 +554,18 @@ main()
554 umask 0022 554 umask 0022
555 tmp_path="$(mktemp -t -d guix.XXX)" 555 tmp_path="$(mktemp -t -d guix.XXX)"
556 556
557 guix_get_bin_list "${GNU_URL}" 557 if [ -z "${GUIX_BINARY_FILE_NAME}" ]; then
558 guix_get_bin "${GNU_URL}" "${BIN_VER}" "$tmp_path" 558 guix_get_bin_list "${GNU_URL}"
559 guix_get_bin "${GNU_URL}" "${BIN_VER}" "$tmp_path"
560 GUIX_BINARY_FILE_NAME=${BIN_VER}.tar.xz
561 else
562 if ! [[ $GUIX_BINARY_FILE_NAME =~ $ARCH_OS ]]; then
563 _err "$ARCH_OS not in ${GUIX_BINARY_FILE_NAME}; aborting"
564 fi
565 _msg "Using manually provided binary ${GUIX_BINARY_FILE_NAME}"
566 fi
559 567
560 sys_create_store "${BIN_VER}.tar.xz" "${tmp_path}" 568 sys_create_store "${GUIX_BINARY_FILE_NAME}" "${tmp_path}"
561 sys_create_build_user 569 sys_create_build_user
562 sys_enable_guix_daemon 570 sys_enable_guix_daemon
563 sys_authorize_build_farms 571 sys_authorize_build_farms