search-paths: Define the 'PATH' environment variable.
* guix/search-paths.scm ($PATH): New variable. * guix/scripts/environment.scm (for-each-search-path): Use it.
This commit is contained in:
parent
369149995c
commit
fdfa753c69
|
@ -57,9 +57,7 @@ path value is appended."
|
||||||
(if (and current (not pure?))
|
(if (and current (not pure?))
|
||||||
(string-append value separator current)
|
(string-append value separator current)
|
||||||
value)))))
|
value)))))
|
||||||
(cons* (search-path-specification
|
(cons* $PATH
|
||||||
(variable "PATH")
|
|
||||||
(files '("bin" "sbin")))
|
|
||||||
(delete-duplicates
|
(delete-duplicates
|
||||||
(append-map package-native-search-paths inputs))))))
|
(append-map package-native-search-paths inputs))))))
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,8 @@
|
||||||
search-path-specification-file-type
|
search-path-specification-file-type
|
||||||
search-path-specification-file-pattern
|
search-path-specification-file-pattern
|
||||||
|
|
||||||
|
$PATH
|
||||||
|
|
||||||
search-path-specification->sexp
|
search-path-specification->sexp
|
||||||
sexp->search-path-specification
|
sexp->search-path-specification
|
||||||
evaluate-search-paths
|
evaluate-search-paths
|
||||||
|
@ -58,6 +60,13 @@
|
||||||
(file-pattern search-path-specification-file-pattern ;#f | string
|
(file-pattern search-path-specification-file-pattern ;#f | string
|
||||||
(default #f)))
|
(default #f)))
|
||||||
|
|
||||||
|
(define $PATH
|
||||||
|
;; The 'PATH' variable. This variable is a bit special: it is not attached
|
||||||
|
;; to any package in particular.
|
||||||
|
(search-path-specification
|
||||||
|
(variable "PATH")
|
||||||
|
(files '("bin" "sbin"))))
|
||||||
|
|
||||||
(define (search-path-specification->sexp spec)
|
(define (search-path-specification->sexp spec)
|
||||||
"Return an sexp representing SPEC, a <search-path-specification>. The sexp
|
"Return an sexp representing SPEC, a <search-path-specification>. The sexp
|
||||||
corresponds to the arguments expected by `set-path-environment-variable'."
|
corresponds to the arguments expected by `set-path-environment-variable'."
|
||||||
|
|
Loading…
Reference in New Issue