aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/packages.scm17
-rw-r--r--guix/describe.scm31
2 files changed, 30 insertions, 18 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
diff --git a/guix/describe.scm b/guix/describe.scm
index c31199c9cd..8851bc46d1 100644
--- a/guix/describe.scm
+++ b/guix/describe.scm
@@ -65,19 +65,28 @@ lives in, or #f if this is not applicable."
(let ((manifest (profile-manifest profile)))
(manifest-entries manifest))))))
-(define package-path-entries
+(define current-channel-entries
(mlambda ()
- "Return a list of package path entries to be added to the package search
-path. These entries are taken from the 'guix pull' profile the calling
-process lives in, when applicable."
- ;; Filter out Guix itself.
- (filter-map (lambda (entry)
- (and (not (string=? (manifest-entry-name entry)
- "guix"))
- (string-append (manifest-entry-item entry)
+ "Return manifest entries corresponding to extra channels--i.e., not the
+'guix' channel."
+ (remove (lambda (entry)
+ (string=? (manifest-entry-name entry) "guix"))
+ (current-profile-entries))))
+
+(define (package-path-entries)
+ "Return two values: the list of package path entries to be added to the
+package search path, and the list to be added to %LOAD-COMPILED-PATH. These
+entries are taken from the 'guix pull' profile the calling process lives in,
+when applicable."
+ ;; Filter out Guix itself.
+ (unzip2 (map (lambda (entry)
+ (list (string-append (manifest-entry-item entry)
"/share/guile/site/"
- (effective-version))))
- (current-profile-entries))))
+ (effective-version))
+ (string-append (manifest-entry-item entry)
+ "/lib/guile/" (effective-version)
+ "/site-ccache")))
+ (current-profile-entries))))
(define (package-provenance package)
"Return the provenance of PACKAGE as an sexp for use as the 'provenance'