summaryrefslogtreecommitdiff
path: root/guix/search-paths.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-05-05 13:57:59 +0200
committerLudovic Courtès <ludo@gnu.org>2015-05-05 15:13:58 +0200
commitfdfa753c69acb00e4d79ee82f8772bde3e1a6cd6 (patch)
tree6bcd3aad6ea8fc495c9a7cb802f8e70d99ffbe43 /guix/search-paths.scm
parent369149995cd4cedc59f1576a23c4df432e682402 (diff)
downloadgnu-guix-fdfa753c69acb00e4d79ee82f8772bde3e1a6cd6.tar
gnu-guix-fdfa753c69acb00e4d79ee82f8772bde3e1a6cd6.tar.gz
search-paths: Define the 'PATH' environment variable.
* guix/search-paths.scm ($PATH): New variable. * guix/scripts/environment.scm (for-each-search-path): Use it.
Diffstat (limited to 'guix/search-paths.scm')
-rw-r--r--guix/search-paths.scm9
1 files changed, 9 insertions, 0 deletions
diff --git a/guix/search-paths.scm b/guix/search-paths.scm
index 9dfad89169..89af1e1492 100644
--- a/guix/search-paths.scm
+++ b/guix/search-paths.scm
@@ -31,6 +31,8 @@
search-path-specification-file-type
search-path-specification-file-pattern
+ $PATH
+
search-path-specification->sexp
sexp->search-path-specification
evaluate-search-paths
@@ -58,6 +60,13 @@
(file-pattern search-path-specification-file-pattern ;#f | string
(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)
"Return an sexp representing SPEC, a <search-path-specification>. The sexp
corresponds to the arguments expected by `set-path-environment-variable'."