Message ID | 20220821154349.22575-1-paren@disroot.org |
---|---|
State | Accepted |
Headers | show |
Series | [bug#57317,v2,1/2] build: profiles: Implicitly set GUIX_EXTENSIONS_PATH. | expand |
Context | Check | Description |
---|---|---|
cbaines/comparison | success | View comparision |
cbaines/git-branch | success | View Git branch |
cbaines/applying patch | success | View Laminar job |
cbaines/issue | success | View issue |
On 21-08-2022 17:43, ( via Guix-patches via wrote: > > +(define-public $GUIX_EXTENSIONS_PATH > + ;; 'GUIX_EXTENSIONS_PATH' is used by Guix to locate extension commands. > + ;; Like 'PATH', it's not attached to any package, so that users don't have > + ;; to install the 'guix' package (which is not supposed to be installed, > + ;; as it will mess up the 'guix pull' installation) or set the variable > + ;; manually. > + (search-path-specification > + (variable "GUIX_EXTENSIONS_PATH") > + (files '("share/guix/extensions")))) I have in the past proposed to add more implicit search paths (GUIX_LOCPATH, SSL_CERT_DIR and SSL_CERT_FILE), but that had been rejected. v1 -> v2 1/2: looks a good change to me. Greetings, Maxime.
diff --git a/guix/build/profiles.scm b/guix/build/profiles.scm index 0c92f222b4..b19d93f971 100644 --- a/guix/build/profiles.scm +++ b/guix/build/profiles.scm @@ -179,9 +179,10 @@ (define-syntax let-fields (() (values (reverse inputs) (delete-duplicates - (cons $PATH - (map sexp->search-path-specification - (reverse search-paths))))))))))) + (cons* $PATH + $GUIX_EXTENSIONS_PATH + (map sexp->search-path-specification + (reverse search-paths))))))))))) (define* (build-profile output manifest #:key (extra-inputs '()) (symlink symlink)) diff --git a/guix/search-paths.scm b/guix/search-paths.scm index 6b13a98946..5a0cddac8f 100644 --- a/guix/search-paths.scm +++ b/guix/search-paths.scm @@ -33,6 +33,7 @@ (define-module (guix search-paths) search-path-specification-file-pattern $PATH + $GUIX_EXTENSIONS_PATH $SSL_CERT_DIR $SSL_CERT_FILE @@ -73,6 +74,16 @@ (define $PATH (variable "PATH") (files '("bin" "sbin")))) +(define-public $GUIX_EXTENSIONS_PATH + ;; 'GUIX_EXTENSIONS_PATH' is used by Guix to locate extension commands. + ;; Like 'PATH', it's not attached to any package, so that users don't have + ;; to install the 'guix' package (which is not supposed to be installed, + ;; as it will mess up the 'guix pull' installation) or set the variable + ;; manually. + (search-path-specification + (variable "GUIX_EXTENSIONS_PATH") + (files '("share/guix/extensions")))) + ;; Two variables for certificates (see (guix)X.509 Certificates), ;; respected by 'openssl', possibly GnuTLS in the future ;; (https://gitlab.com/gnutls/gnutls/-/merge_requests/1541)