diff options
| author | Marius Bakke <mbakke@fastmail.com> | 2018-12-03 19:15:17 +0100 |
|---|---|---|
| committer | Marius Bakke <mbakke@fastmail.com> | 2018-12-03 19:15:17 +0100 |
| commit | 99f63f011df2aab38e98d7ee4608a8c70bf74c4d (patch) | |
| tree | 3f224028f30c60f2ed7b9846365ad926192fc7e9 /gnu/packages.scm | |
| parent | e9a8b603337802a77ff2d68f0d30dc0e67721e3a (diff) | |
| parent | 4f03aa23e805bd653de774e1d74ed2f50826899b (diff) | |
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages.scm')
| -rw-r--r-- | gnu/packages.scm | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/gnu/packages.scm b/gnu/packages.scm index 7b954769e..532297239 100644 --- a/gnu/packages.scm +++ b/gnu/packages.scm @@ -30,6 +30,7 @@ #:select ((package-name->name+version . hyphen-separated-name->name+version))) #:autoload (guix profiles) (packages->manifest) + #:use-module (guix describe) #:use-module (ice-9 vlist) #:use-module (ice-9 match) #:use-module (srfi srfi-1) @@ -46,6 +47,7 @@ %auxiliary-files-path %bootstrap-binaries-path %package-module-path + %default-package-module-path fold-packages @@ -130,22 +132,31 @@ for system '~a'") ("gnu/packages.scm" gnu/) ("guix.scm")))) +(define %default-package-module-path + ;; Default search path for package modules. + `((,%distro-root-directory . "gnu/packages"))) + (define %package-module-path ;; Search path for package modules. Each item must be either a directory ;; name or a pair whose car is a directory and whose cdr is a sub-directory ;; to narrow the search. (let* ((not-colon (char-set-complement (char-set #\:))) (environment (string-tokenize (or (getenv "GUIX_PACKAGE_PATH") "") - not-colon))) - ;; Automatically add items from $GUIX_PACKAGE_PATH to Guile's search path. - (for-each (lambda (directory) - (set! %load-path (cons directory %load-path)) - (set! %load-compiled-path - (cons directory %load-compiled-path))) - environment) + not-colon)) + (channels (package-path-entries))) + ;; Automatically add channels and items from $GUIX_PACKAGE_PATH to Guile's + ;; search path. For historical reasons, $GUIX_PACKAGE_PATH goes to the + ;; front; channels go to the back so that they don't override Guix' own + ;; modules. + (set! %load-path + (append environment %load-path channels)) + (set! %load-compiled-path + (append environment %load-compiled-path channels)) (make-parameter - (append environment `((,%distro-root-directory . "gnu/packages")))))) + (append environment + %default-package-module-path + channels)))) (define %patch-path ;; Define it after '%package-module-path' so that '%load-path' contains user |