summaryrefslogtreecommitdiff
path: root/guix/describe.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 /guix/describe.scm
parent082c648d281dce035f8d72e64cfd369a0f775c45 (diff)
downloadpatches-bfc9c339301ffe6dd15d156894dc27e05f6f081f.tar
patches-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 'guix/describe.scm')
-rw-r--r--guix/describe.scm31
1 files changed, 20 insertions, 11 deletions
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'