summaryrefslogtreecommitdiff
path: root/guix/self.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2018-08-28 01:22:24 +0200
committerMarius Bakke <mbakke@fastmail.com>2018-08-28 01:22:24 +0200
commit61fca0fd22b81bcc0201a336a02cac74b42c6a44 (patch)
tree67cca9c72282f24b9ceb0b1706c314537e8c37ea /guix/self.scm
parent57dac1ee935edfab91e9b182c1f7c9ddae794656 (diff)
parent526ce419303ac511be8d51b41471022bed472e6b (diff)
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/self.scm')
-rw-r--r--guix/self.scm24
1 files changed, 14 insertions, 10 deletions
diff --git a/guix/self.scm b/guix/self.scm
index c800c452e6..5b088c413b 100644
--- a/guix/self.scm
+++ b/guix/self.scm
@@ -367,22 +367,26 @@ DOMAIN, a gettext domain."
guile (guile-version (effective-version)))
"Return the 'guix' command such that it adds MODULES and DEPENDENCIES in its
load path."
+ (define source-directories
+ (map (lambda (package)
+ (file-append package "/share/guile/site/"
+ guile-version))
+ dependencies))
+
+ (define object-directories
+ (map (lambda (package)
+ (file-append package "/lib/guile/"
+ guile-version "/site-ccache"))
+ dependencies))
+
(program-file "guix-command"
#~(begin
(set! %load-path
- (append '#$(map (lambda (package)
- (file-append package
- "/share/guile/site/"
- guile-version))
- dependencies)
+ (append (filter file-exists? '#$source-directories)
%load-path))
(set! %load-compiled-path
- (append '#$(map (lambda (package)
- (file-append package "/lib/guile/"
- guile-version
- "/site-ccache"))
- dependencies)
+ (append (filter file-exists? '#$object-directories)
%load-compiled-path))
(set! %load-path (cons #$modules %load-path))