From fd2e88d6f3f2a8813457bd5e02f4a4bda09049bb Mon Sep 17 00:00:00 2001 From: fanquake Date: Thu, 30 Nov 2023 14:36:16 +0000 Subject: [PATCH] Merge bitcoin/bitcoin#26077: guix: switch from `guix environment` to `guix shell` 66c4b58e518aff08030b3c879c44af7716110619 guix: switch from guix environment to guix shell (fanquake) Pull request description: See https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix-environment.html. > Deprecation warning: The guix environment command is deprecated in favor of guix shell, which performs similar functions but is more convenient to use. See Invoking guix shell. > Being deprecated, guix environment is slated for eventual removal, but the Guix project is committed to keeping it until May 1st, 2023. Please get in touch with us at guix-devel@gnu.org if you would like to discuss it. See also https://guix.gnu.org/blog/2021/from-guix-environment-to-guix-shell/ for a blog post and additional details. Guix `shell` was added to Guix ~1 year ago, in this commit, https://git.savannah.gnu.org/cgit/guix.git/commit/?id=80edb7df6586464aa40e84e103f0045452de95db, which isn't part of the 1.3.0 release binaries out of the box, but invoking a `guix pull`, and updating will make it available. i.e: ```bash bash-5.1# guix --version guix (GNU Guix) 1.3.0 Copyright (C) 2021 the Guix authors License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. bash-5.1# guix shell guix: shell: command not found Try 'guix --help' for more information. bash-5.1# guix pull Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'... Authenticating channel 'guix', commits 9edb3f6 to 7a980bb (6,278 new commits)... Building from this channel: guix https://git.savannah.gnu.org/git/guix.git7a980bb < snip > building /gnu/store/2wwwsczxcw61m05p4mv0kf0advx4fqsb-inferior-script.scm.drv... building package cache... building profile with 1 package... New in this revision: 6,866 new packages: a2jmidid, abjad, bash-5.1# guix help shell Usage: guix shell [OPTION] PACKAGES... [-- COMMAND...] Build an environment that includes PACKAGES and execute COMMAND or an interactive shell in that environment. ``` ACKs for top commit: TheCharlatan: ACK 66c4b58e518aff08030b3c879c44af7716110619 Tree-SHA512: caa3fd2ca8d0f261c50ecdda3728a75389d24d89b51293dedc704ee77ab1342b2bb08ca8c871dcb4646229f056ec86cb15500934ded1b0c501a3ffc25aaa8ae6 --- contrib/guix/README.md | 4 ++-- contrib/guix/guix-build | 4 ++-- contrib/guix/guix-codesign | 4 ++-- contrib/guix/libexec/build.sh | 2 +- contrib/guix/libexec/codesign.sh | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/contrib/guix/README.md b/contrib/guix/README.md index 23050cec48..be0672cbd3 100644 --- a/contrib/guix/README.md +++ b/contrib/guix/README.md @@ -259,7 +259,7 @@ details. Override the number of jobs to run simultaneously, you might want to do so on a memory-limited machine. This may be passed to: - - `guix` build commands as in `guix environment --cores="$JOBS"` + - `guix` build commands as in `guix shell --cores="$JOBS"` - `make` as in `make --jobs="$JOBS"` - `xargs` as in `xargs -P"$JOBS"` @@ -301,7 +301,7 @@ details. * _**ADDITIONAL_GUIX_ENVIRONMENT_FLAGS**_ - Additional flags to be passed to the invocation of `guix environment` inside + Additional flags to be passed to the invocation of `guix shell` inside `guix time-machine`. # Choosing your security model diff --git a/contrib/guix/guix-build b/contrib/guix/guix-build index 0d7ecfa271..2dd61b4dbd 100755 --- a/contrib/guix/guix-build +++ b/contrib/guix/guix-build @@ -365,7 +365,7 @@ EOF # Run the build script 'contrib/guix/libexec/build.sh' in the build # container specified by 'contrib/guix/manifest.scm'. # - # Explanation of `guix environment` flags: + # Explanation of `guix shell` flags: # # --container run command within an isolated container # @@ -428,7 +428,7 @@ EOF # more information. # # shellcheck disable=SC2086,SC2031 - time-machine environment --manifest="${PWD}/contrib/guix/manifest.scm" \ + time-machine shell --manifest="${PWD}/contrib/guix/manifest.scm" \ --container \ --pure \ --no-cwd \ diff --git a/contrib/guix/guix-codesign b/contrib/guix/guix-codesign index 445ee91172..3ce0381865 100755 --- a/contrib/guix/guix-codesign +++ b/contrib/guix/guix-codesign @@ -286,7 +286,7 @@ EOF # Run the build script 'contrib/guix/libexec/build.sh' in the build # container specified by 'contrib/guix/manifest.scm'. # - # Explanation of `guix environment` flags: + # Explanation of `guix shell` flags: # # --container run command within an isolated container # @@ -343,7 +343,7 @@ EOF # more information. # # shellcheck disable=SC2086,SC2031 - time-machine environment --manifest="${PWD}/contrib/guix/manifest.scm" \ + time-machine shell --manifest="${PWD}/contrib/guix/manifest.scm" \ --container \ --pure \ --no-cwd \ diff --git a/contrib/guix/libexec/build.sh b/contrib/guix/libexec/build.sh index 2618bfe226..f963578db5 100755 --- a/contrib/guix/libexec/build.sh +++ b/contrib/guix/libexec/build.sh @@ -5,7 +5,7 @@ export TZ=UTC # Although Guix _does_ set umask when building its own packages (in our case, # this is all packages in manifest.scm), it does not set it for `guix -# environment`. It does make sense for at least `guix environment --container` +# shell`. It does make sense for at least `guix shell --container` # to set umask, so if that change gets merged upstream and we bump the # time-machine to a commit which includes the aforementioned change, we can # remove this line. diff --git a/contrib/guix/libexec/codesign.sh b/contrib/guix/libexec/codesign.sh index 88ee195e83..91183fb53c 100755 --- a/contrib/guix/libexec/codesign.sh +++ b/contrib/guix/libexec/codesign.sh @@ -5,7 +5,7 @@ export TZ=UTC # Although Guix _does_ set umask when building its own packages (in our case, # this is all packages in manifest.scm), it does not set it for `guix -# environment`. It does make sense for at least `guix environment --container` +# shell`. It does make sense for at least `guix shell --container` # to set umask, so if that change gets merged upstream and we bump the # time-machine to a commit which includes the aforementioned change, we can # remove this line.