aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-03-11 22:14:30 +0100
committerLudovic Courtès <ludo@gnu.org>2019-03-11 23:12:26 +0100
commitbfc9c339301ffe6dd15d156894dc27e05f6f081f (patch)
tree589e7e4903c5fe03e8c89fc87fbb1235fc8da88c /gnu/packages.scm
parent082c648d281dce035f8d72e64cfd369a0f775c45 (diff)
downloadguix-bfc9c339301ffe6dd15d156894dc27e05f6f081f.tar
guix-bfc9c339301ffe6dd15d156894dc27e05f6f081f.tar.gz
packages: Add the channel .go files to the search path.
Until now %LOAD-COMPILED-PATH would wrongfully contain: CHANNEL/share/guile/site/X.Y for each channel, thereby ignoring all the .go files of channels. This fixes it so that %LOAD-COMPILED-PATH instead contains: CHANNEL/lib/guile/X.Y/site-ccache * guix/describe.scm (current-channel-entries): New procedure. (package-path-entries): Change to return the %LOAD-COMPILED-PATH entries as a second value. * gnu/packages.scm (%package-module-path): Expect two values from 'package-path-entries' and augment %LOAD-COMPILED-PATH accordingly.
Diffstat (limited to 'gnu/packages.scm')
-rw-r--r--gnu/packages.scm17
1 files changed, 10 insertions, 7 deletions
diff --git a/gnu/packages.scm b/gnu/packages.scm
index 7b17e70c53..9f211ae23c 100644
--- a/gnu/packages.scm
+++ b/gnu/packages.scm
@@ -155,23 +155,26 @@ flags."
;; 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))
- (channels (package-path-entries)))
+ (let*-values (((not-colon)
+ (char-set-complement (char-set #\:)))
+ ((environment)
+ (string-tokenize (or (getenv "GUIX_PACKAGE_PATH") "")
+ not-colon))
+ ((channels-scm channels-go)
+ (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))
+ (append environment %load-path channels-scm))
(set! %load-compiled-path
- (append environment %load-compiled-path channels))
+ (append environment %load-compiled-path channels-go))
(make-parameter
(append environment
%default-package-module-path
- channels))))
+ channels-scm))))
(define %patch-path
;; Define it after '%package-module-path' so that '%load-path' contains user