X-Git-Url: http://git.hcoop.net/jackhill/guix/guix.git/blobdiff_plain/f89aa1521af69b0e1a1350c2380579788b0f8945..6eb1b1d8790fc7d0f1d169aa702d2c0b0f759aaa:/build-aux/compile-as-derivation.scm diff --git a/build-aux/compile-as-derivation.scm b/build-aux/compile-as-derivation.scm index afb134a92a..d945a8c79c 100644 --- a/build-aux/compile-as-derivation.scm +++ b/build-aux/compile-as-derivation.scm @@ -20,12 +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"))) - (cut string-append <> "/guix/latest"))) +;; 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) @@ -43,7 +51,7 @@ (mlet* %store-monad ((source (interned-file source "guix-source" #:select? git? #:recursive? #t)) - (drv (build source))) + (drv (build source #:pull-version 1))) (mbegin %store-monad (show-what-to-build* (list drv)) (built-derivations (list drv))