diff options
author | Andreas Enge <andreas@enge.fr> | 2023-03-20 18:21:47 +0100 |
---|---|---|
committer | Andreas Enge <andreas@enge.fr> | 2023-03-20 18:49:06 +0100 |
commit | ccb62d8feb50e2859d7c41429a9e3d9e0fe30bfe (patch) | |
tree | 4ab573cee33f277828ad553a22579175b1dda22d /guix/scripts | |
parent | 098bd280f82350073e8280e37d56a14162eed09c (diff) | |
parent | f80215c7c4ae5ea0c316f4766e6c05ae4218ede3 (diff) |
Merge remote-tracking branch 'origin/master' into core-updates
Diffstat (limited to 'guix/scripts')
-rw-r--r-- | guix/scripts/archive.scm | 1 | ||||
-rw-r--r-- | guix/scripts/build.scm | 3 | ||||
-rw-r--r-- | guix/scripts/challenge.scm | 1 | ||||
-rw-r--r-- | guix/scripts/deploy.scm | 1 | ||||
-rw-r--r-- | guix/scripts/discover.scm | 1 | ||||
-rw-r--r-- | guix/scripts/download.scm | 3 | ||||
-rw-r--r-- | guix/scripts/edit.scm | 3 | ||||
-rw-r--r-- | guix/scripts/environment.scm | 24 | ||||
-rw-r--r-- | guix/scripts/graph.scm | 1 | ||||
-rw-r--r-- | guix/scripts/hash.scm | 4 | ||||
-rw-r--r-- | guix/scripts/home.scm | 2 | ||||
-rw-r--r-- | guix/scripts/import.scm | 3 | ||||
-rw-r--r-- | guix/scripts/offload.scm | 1 | ||||
-rw-r--r-- | guix/scripts/pack.scm | 12 | ||||
-rw-r--r-- | guix/scripts/package.scm | 3 | ||||
-rw-r--r-- | guix/scripts/publish.scm | 4 | ||||
-rw-r--r-- | guix/scripts/pull.scm | 2 | ||||
-rw-r--r-- | guix/scripts/refresh.scm | 3 | ||||
-rw-r--r-- | guix/scripts/repl.scm | 2 | ||||
-rw-r--r-- | guix/scripts/search.scm | 1 | ||||
-rw-r--r-- | guix/scripts/show.scm | 1 | ||||
-rw-r--r-- | guix/scripts/style.scm | 2 | ||||
-rwxr-xr-x | guix/scripts/substitute.scm | 4 | ||||
-rw-r--r-- | guix/scripts/system.scm | 7 | ||||
-rw-r--r-- | guix/scripts/time-machine.scm | 1 |
25 files changed, 22 insertions, 68 deletions
diff --git a/guix/scripts/archive.scm b/guix/scripts/archive.scm index 3b2bdee835..a7ff1593a6 100644 --- a/guix/scripts/archive.scm +++ b/guix/scripts/archive.scm @@ -18,7 +18,6 @@ ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. (define-module (guix scripts archive) - #:use-module (guix config) #:use-module (guix utils) #:use-module (guix combinators) #:use-module ((guix build utils) #:select (mkdir-p)) diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm index 6a4a32fc0a..72a24f91ac 100644 --- a/guix/scripts/build.scm +++ b/guix/scripts/build.scm @@ -27,7 +27,6 @@ #:use-module (guix store) #:use-module (guix derivations) #:use-module (guix packages) - #:use-module (guix memoization) #:use-module (guix utils) #:use-module (guix monads) #:use-module (guix gexp) @@ -36,10 +35,8 @@ #:autoload (guix http-client) (http-fetch http-get-error?) #:use-module (ice-9 format) #:use-module (ice-9 match) - #:use-module (ice-9 vlist) #:use-module (srfi srfi-1) #:use-module (srfi srfi-9) - #:use-module (srfi srfi-11) #:use-module (srfi srfi-26) #:use-module (srfi srfi-34) #:use-module (srfi srfi-35) diff --git a/guix/scripts/challenge.scm b/guix/scripts/challenge.scm index 620a1762a1..4821e11bf6 100644 --- a/guix/scripts/challenge.scm +++ b/guix/scripts/challenge.scm @@ -24,7 +24,6 @@ #:use-module (guix utils) #:use-module (guix monads) #:use-module (guix base32) - #:use-module (guix packages) #:use-module ((guix progress) #:hide (dump-port*)) #:use-module (guix serialization) #:use-module (guix substitutes) diff --git a/guix/scripts/deploy.scm b/guix/scripts/deploy.scm index ef6f9acc86..14ce736174 100644 --- a/guix/scripts/deploy.scm +++ b/guix/scripts/deploy.scm @@ -26,7 +26,6 @@ #:use-module (guix store) #:use-module (guix gexp) #:use-module (guix ui) - #:use-module (guix utils) #:use-module ((guix status) #:select (with-status-verbosity)) #:use-module (guix diagnostics) #:use-module (guix i18n) diff --git a/guix/scripts/discover.scm b/guix/scripts/discover.scm index dadade81bb..8970f835c9 100644 --- a/guix/scripts/discover.scm +++ b/guix/scripts/discover.scm @@ -23,7 +23,6 @@ #:use-module (guix scripts) #:use-module (guix ui) #:use-module (guix utils) - #:use-module (guix build syscalls) #:use-module (guix build utils) #:use-module (guix scripts publish) #:use-module (avahi) diff --git a/guix/scripts/download.scm b/guix/scripts/download.scm index 5a91390358..0ab5c8c39c 100644 --- a/guix/scripts/download.scm +++ b/guix/scripts/download.scm @@ -35,11 +35,8 @@ #:use-module (web uri) #:use-module (ice-9 match) #:use-module (srfi srfi-1) - #:use-module (srfi srfi-14) #:use-module (srfi srfi-26) #:use-module (srfi srfi-37) - #:use-module (rnrs bytevectors) - #:use-module (ice-9 binary-ports) #:export (guix-download)) diff --git a/guix/scripts/edit.scm b/guix/scripts/edit.scm index 8e777d1405..5ce2870c5a 100644 --- a/guix/scripts/edit.scm +++ b/guix/scripts/edit.scm @@ -22,7 +22,8 @@ #:use-module (guix ui) #:use-module (guix scripts) #:use-module ((guix scripts build) #:select (%standard-build-options)) - #:use-module (guix utils) + #:use-module ((guix diagnostics) + #:select (location-file location-line)) #:use-module (gnu packages) #:use-module (srfi srfi-1) #:use-module (srfi srfi-37) diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm index 44cfcb4f76..a4939ea63c 100644 --- a/guix/scripts/environment.scm +++ b/guix/scripts/environment.scm @@ -514,6 +514,11 @@ by running 'set' in the shell." (catch #t (lambda () (load-profile profile manifest #:pure? #t) + + ;; Mark the terminal as "unknown" do avoid ANSI escape codes such + ;; as bracketed paste that would mess up the output of the script. + (setenv "TERM" "") + (setenv "GUIX_ENVIRONMENT" profile) (close-fdes controller) (login-tty inferior) @@ -767,14 +772,17 @@ WHILE-LIST." (append (override-user-mappings user home - (append user-mappings - ;; Share current working directory, unless asked not to. - (if map-cwd? - (list (file-system-mapping - (source cwd) - (target cwd) - (writable? #t))) - '()))) + (append + ;; Share current working directory, unless asked not to. + (if map-cwd? + (list (file-system-mapping + (source cwd) + (target cwd) + (writable? #t))) + '()) + ;; Add the user mappings *after* the current working directory + ;; so that a user can layer bind mounts on top of it. + user-mappings)) ;; Mappings for the union closure of all inputs. (map (lambda (dir) (file-system-mapping diff --git a/guix/scripts/graph.scm b/guix/scripts/graph.scm index 6847dd1962..c075e0ec29 100644 --- a/guix/scripts/graph.scm +++ b/guix/scripts/graph.scm @@ -20,7 +20,6 @@ (define-module (guix scripts graph) #:use-module (guix ui) #:use-module (guix graph) - #:use-module (guix grafts) #:use-module (guix scripts) #:use-module (guix packages) #:use-module (guix monads) diff --git a/guix/scripts/hash.scm b/guix/scripts/hash.scm index 4e792c6a03..6dc67a2416 100644 --- a/guix/scripts/hash.scm +++ b/guix/scripts/hash.scm @@ -23,18 +23,14 @@ (define-module (guix scripts hash) #:use-module (gcrypt hash) - #:use-module (guix serialization) #:use-module (guix ui) #:use-module (guix hash) #:use-module (guix scripts) #:use-module (guix base16) #:use-module (guix base32) #:autoload (guix base64) (base64-encode) - #:use-module (ice-9 binary-ports) - #:use-module (rnrs files) #:use-module (ice-9 match) #:use-module (srfi srfi-1) - #:use-module (srfi srfi-11) #:use-module (srfi srfi-26) #:use-module (srfi srfi-37) #:autoload (disarchive git-hash) (git-hash-file git-hash-directory) diff --git a/guix/scripts/home.scm b/guix/scripts/home.scm index 445853d01f..7b2c3ff6f0 100644 --- a/guix/scripts/home.scm +++ b/guix/scripts/home.scm @@ -23,9 +23,7 @@ ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. (define-module (guix scripts home) - #:use-module (gnu packages admin) #:use-module ((gnu services) #:hide (delete)) - #:use-module (gnu packages) #:autoload (gnu packages base) (coreutils) #:autoload (gnu packages bash) (bash) #:autoload (gnu packages gnupg) (guile-gcrypt) diff --git a/guix/scripts/import.scm b/guix/scripts/import.scm index fe1d7a8dda..f84a964a53 100644 --- a/guix/scripts/import.scm +++ b/guix/scripts/import.scm @@ -28,9 +28,6 @@ #:use-module (guix read-print) #:use-module (guix utils) #:use-module (srfi srfi-1) - #:use-module (srfi srfi-11) - #:use-module (srfi srfi-26) - #:use-module (srfi srfi-37) #:use-module (ice-9 format) #:use-module (ice-9 match) #:export (%standard-import-options diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm index 8c6132e7c3..7b76126d35 100644 --- a/guix/scripts/offload.scm +++ b/guix/scripts/offload.scm @@ -39,7 +39,6 @@ #:autoload (guix derivations) (read-derivation-from-file derivation-file-name build-derivations) - #:autoload (guix serialization) (nar-error? nar-error-file) #:autoload (guix nar) (restore-file-set) #:use-module ((guix utils) #:select (%current-system)) #:use-module ((guix build syscalls) diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm index eb41eb5563..0dc9979194 100644 --- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm @@ -28,7 +28,6 @@ #:use-module (guix scripts) #:use-module (guix ui) #:use-module (guix gexp) - #:use-module ((guix build utils) #:select (%xz-parallel-args)) #:use-module (guix utils) #:use-module (guix store) #:use-module ((guix status) #:select (with-status-verbosity)) @@ -54,7 +53,6 @@ #:use-module ((gnu packages compression) #:hide (zip)) #:use-module (gnu packages guile) #:use-module (gnu packages base) - #:autoload (gnu packages package-management) (guix) #:autoload (gnu packages gnupg) (guile-gcrypt) #:autoload (gnu packages guile) (guile2.0-json guile-json) #:use-module (srfi srfi-1) @@ -1203,12 +1201,10 @@ last resort for relocation." (utf8->string bv))))) (define (runpath file) - ;; Return the RUNPATH of FILE as a list of directories. - (let* ((bv (call-with-input-file file get-bytevector-all)) - (elf (parse-elf bv)) - (dyninfo (elf-dynamic-info elf))) - (or (and=> dyninfo elf-dynamic-info-runpath) - '()))) + ;; Return the "recursive" RUNPATH of FILE as a list of + ;; directories. + (delete-duplicates + (map dirname (file-needed/recursive file)))) (define (elf-loader-compile-flags program) ;; Return the cpp flags defining macros for the ld.so/fakechroot diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index cb58f56d5a..ab1968b62d 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -39,9 +39,7 @@ #:use-module (guix profiles) #:use-module (guix search-paths) #:autoload (guix import json) (json->scheme-file) - #:use-module (guix monads) #:use-module (guix utils) - #:use-module (guix config) #:use-module (guix scripts) #:use-module (guix scripts build) #:use-module (guix transformations) @@ -54,7 +52,6 @@ #:use-module (ice-9 format) #:use-module (ice-9 match) #:autoload (ice-9 pretty-print) (pretty-print) - #:use-module (ice-9 regex) #:use-module (ice-9 vlist) #:use-module (srfi srfi-1) #:use-module (srfi srfi-11) diff --git a/guix/scripts/publish.scm b/guix/scripts/publish.scm index 6307ae54bb..ada81838ac 100644 --- a/guix/scripts/publish.scm +++ b/guix/scripts/publish.scm @@ -23,16 +23,13 @@ (define-module (guix scripts publish) #:use-module ((system repl server) #:prefix repl:) - #:use-module (ice-9 binary-ports) #:use-module (ice-9 format) #:use-module (ice-9 match) #:use-module (ice-9 poll) - #:use-module (ice-9 regex) #:use-module (ice-9 rdelim) #:use-module (ice-9 threads) #:use-module (rnrs bytevectors) #:use-module (srfi srfi-1) - #:use-module (srfi srfi-2) #:use-module (srfi srfi-9) #:use-module (srfi srfi-9 gnu) #:use-module (srfi srfi-19) @@ -50,7 +47,6 @@ #:use-module (guix base32) #:use-module (guix base64) #:use-module (guix config) - #:use-module (guix derivations) #:use-module (gcrypt hash) #:use-module (guix pki) #:use-module (gcrypt pk-crypto) diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index 2be8de3b9c..cd2e470289 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -30,7 +30,6 @@ #:use-module (guix packages) #:use-module (guix derivations) #:use-module (guix profiles) - #:use-module (guix gexp) #:use-module (guix memoization) #:use-module (guix monads) #:use-module (guix channels) @@ -45,7 +44,6 @@ #:autoload (gnu packages) (fold-available-packages) #:autoload (guix scripts package) (build-and-use-profile delete-matching-generations) - #:autoload (gnu packages base) (canonical-package) #:autoload (gnu packages bootstrap) (%bootstrap-guile) #:autoload (gnu packages certs) (le-certs) #:use-module (srfi srfi-1) diff --git a/guix/scripts/refresh.scm b/guix/scripts/refresh.scm index 6498d73c2b..ee94ed29a1 100644 --- a/guix/scripts/refresh.scm +++ b/guix/scripts/refresh.scm @@ -43,15 +43,12 @@ #:use-module (gnu packages) #:use-module ((gnu packages commencement) #:select (%final-inputs)) #:use-module (ice-9 match) - #:use-module (ice-9 regex) - #:use-module (ice-9 vlist) #:use-module (ice-9 format) #:use-module (srfi srfi-1) #:use-module (srfi srfi-9) #:use-module (srfi srfi-26) #:use-module (srfi srfi-37) #:use-module (srfi srfi-71) - #:use-module (ice-9 binary-ports) #:export (guix-refresh)) diff --git a/guix/scripts/repl.scm b/guix/scripts/repl.scm index 0b978ae35f..fd23a2b982 100644 --- a/guix/scripts/repl.scm +++ b/guix/scripts/repl.scm @@ -23,10 +23,8 @@ #:use-module (guix scripts) #:use-module (guix repl) #:use-module (srfi srfi-1) - #:use-module (srfi srfi-26) #:use-module (srfi srfi-37) #:use-module (ice-9 match) - #:use-module (rnrs bytevectors) #:autoload (guix describe) (current-profile) #:autoload (system repl repl) (start-repl) #:autoload (system repl server) diff --git a/guix/scripts/search.scm b/guix/scripts/search.scm index 27b9da5278..307ea410b9 100644 --- a/guix/scripts/search.scm +++ b/guix/scripts/search.scm @@ -24,7 +24,6 @@ #:select (%standard-build-options)) #:use-module (guix scripts) #:use-module (srfi srfi-1) - #:use-module (srfi srfi-26) #:use-module (srfi srfi-37) #:export (guix-search)) diff --git a/guix/scripts/show.scm b/guix/scripts/show.scm index c747eedd21..f6d8256951 100644 --- a/guix/scripts/show.scm +++ b/guix/scripts/show.scm @@ -23,7 +23,6 @@ #:select (%standard-build-options)) #:use-module (guix scripts) #:use-module (srfi srfi-1) - #:use-module (srfi srfi-26) #:use-module (srfi srfi-37) #:export (guix-show)) diff --git a/guix/scripts/style.scm b/guix/scripts/style.scm index fa7175fb16..8e89a58948 100644 --- a/guix/scripts/style.scm +++ b/guix/scripts/style.scm @@ -31,7 +31,6 @@ #:autoload (gnu packages) (specification->package fold-packages) #:use-module (guix scripts) #:use-module ((guix scripts build) #:select (%standard-build-options)) - #:use-module (guix combinators) #:use-module (guix ui) #:use-module (guix packages) #:use-module (guix utils) @@ -42,7 +41,6 @@ #:use-module (ice-9 match) #:use-module (srfi srfi-1) #:use-module (srfi srfi-9) - #:use-module (srfi srfi-26) #:use-module (srfi srfi-34) #:use-module (srfi srfi-37) #:export (guix-style)) diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm index fedb33019d..109b0c7900 100755 --- a/guix/scripts/substitute.scm +++ b/guix/scripts/substitute.scm @@ -26,7 +26,6 @@ #:use-module (guix store) #:use-module (guix substitutes) #:use-module (guix utils) - #:use-module (guix combinators) #:use-module (guix config) #:use-module (guix records) #:use-module (guix diagnostics) @@ -36,7 +35,6 @@ #:autoload (guix scripts discover) (read-substitute-urls) #:use-module (gcrypt hash) #:use-module (guix base32) - #:use-module (guix base64) #:use-module (guix cache) #:use-module (gcrypt pk-crypto) #:use-module (guix pki) @@ -55,10 +53,8 @@ #:use-module (ice-9 ftw) #:use-module (rnrs bytevectors) #:use-module (srfi srfi-1) - #:use-module (srfi srfi-19) #:use-module (srfi srfi-26) #:use-module (srfi srfi-34) - #:use-module (srfi srfi-35) #:use-module (srfi srfi-71) #:use-module (web uri) #:use-module (guix http-client) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index c0bc295c00..d7163dd3eb 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -55,20 +55,14 @@ #:autoload (guix scripts pull) (channel-commit-hyperlink) #:autoload (guix graph) (export-graph node-type graph-backend-name lookup-backend) - #:use-module (guix scripts graph) #:use-module (guix scripts system reconfigure) #:use-module (guix build utils) #:use-module (guix progress) - #:use-module ((guix build syscalls) #:select (terminal-columns)) #:use-module (gnu build image) #:use-module (gnu build install) #:autoload (gnu build file-systems) (find-partition-by-label find-partition-by-uuid) - #:autoload (gnu build linux-modules) - (device-module-aliases matching-modules) - #:use-module (gnu system linux-initrd) #:use-module (gnu image) - #:use-module (guix platform) #:use-module (gnu system) #:use-module (gnu bootloader) #:use-module (gnu system file-systems) @@ -81,7 +75,6 @@ #:use-module (gnu services shepherd) #:use-module (gnu services herd) #:use-module (srfi srfi-1) - #:use-module (srfi srfi-11) #:use-module (srfi srfi-19) #:use-module (srfi srfi-26) #:use-module (srfi srfi-34) diff --git a/guix/scripts/time-machine.scm b/guix/scripts/time-machine.scm index 5179ea035f..d7c71ef705 100644 --- a/guix/scripts/time-machine.scm +++ b/guix/scripts/time-machine.scm @@ -22,7 +22,6 @@ #:use-module (guix ui) #:use-module (guix scripts) #:use-module (guix inferior) - #:use-module (guix channels) #:use-module (guix store) #:use-module (guix status) #:use-module ((guix git) |