diff options
author | Marius Bakke <mbakke@fastmail.com> | 2018-09-03 19:20:06 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2018-09-03 19:20:06 +0200 |
commit | 70dc8db8e7a44e0357c6b0582a710a918bd2e353 (patch) | |
tree | 083102cf532c523068f018e2b113947ca6a3db02 /build-aux/compile-as-derivation.scm | |
parent | 279ed3efee9c71116d368163f805fe9494518687 (diff) | |
parent | c702749dfd47ea6983768cd5b8cf828898445af0 (diff) | |
download | guix-70dc8db8e7a44e0357c6b0582a710a918bd2e353.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'build-aux/compile-as-derivation.scm')
-rw-r--r-- | build-aux/compile-as-derivation.scm | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/build-aux/compile-as-derivation.scm b/build-aux/compile-as-derivation.scm index 59a84b1415..d945a8c79c 100644 --- a/build-aux/compile-as-derivation.scm +++ b/build-aux/compile-as-derivation.scm @@ -20,13 +20,20 @@ (use-modules (srfi srfi-26)) -;; Add ~/.config/guix/latest to the search path. -(add-to-load-path - (and=> (or (getenv "XDG_CONFIG_HOME") - (and=> (getenv "HOME") - (cut string-append <> "/.config"))) - (cute string-append <> "/guix/current/share/guile/site/" - (effective-version)))) +;; Add ~/.config/guix/current to the search path. +(eval-when (expand load eval) + (and=> (or (getenv "XDG_CONFIG_HOME") + (and=> (getenv "HOME") + (cut string-append <> "/.config/guix/current"))) + (lambda (current) + (set! %load-path + (cons (string-append current "/share/guile/site/" + (effective-version)) + %load-path)) + (set! %load-compiled-path + (cons (string-append current "/lib/guile/" (effective-version) + "/site-ccache") + %load-compiled-path))))) (use-modules (guix) (guix ui) (guix git-download) |