guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

14/15: guix-install.sh: Allow overriding the Guix binary source.


From: guix-commits
Subject: 14/15: guix-install.sh: Allow overriding the Guix binary source.
Date: Sat, 24 Apr 2021 10:34:48 -0400 (EDT)

apteryx pushed a commit to branch version-1.3.0
in repository guix.

commit 51f95d4e6496d299d4852d7659213fdcd8e131bc
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Sat Apr 24 09:59:54 2021 -0400

    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.
---
 etc/guix-install.sh | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 949ef77..168bf72 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -554,10 +554,18 @@ main()
     umask 0022
     tmp_path="$(mktemp -t -d guix.XXX)"
 
-    guix_get_bin_list "${GNU_URL}"
-    guix_get_bin "${GNU_URL}" "${BIN_VER}" "$tmp_path"
+    if [ -z "${GUIX_BINARY_FILE_NAME}" ]; then
+        guix_get_bin_list "${GNU_URL}"
+        guix_get_bin "${GNU_URL}" "${BIN_VER}" "$tmp_path"
+        GUIX_BINARY_FILE_NAME=${BIN_VER}.tar.xz
+    else
+        if ! [[ $GUIX_BINARY_FILE_NAME =~ $ARCH_OS ]]; then
+            _err "$ARCH_OS not in ${GUIX_BINARY_FILE_NAME}; aborting"
+        fi
+        _msg "Using manually provided binary ${GUIX_BINARY_FILE_NAME}"
+    fi
 
-    sys_create_store "${BIN_VER}.tar.xz" "${tmp_path}"
+    sys_create_store "${GUIX_BINARY_FILE_NAME}" "${tmp_path}"
     sys_create_build_user
     sys_enable_guix_daemon
     sys_authorize_build_farms



reply via email to

[Prev in Thread] Current Thread [Next in Thread]