[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/07: compile-as-derivation: Adjust %load-compiled-path.
From: |
Ludovic Courtès |
Subject: |
01/07: compile-as-derivation: Adjust %load-compiled-path. |
Date: |
Sun, 2 Sep 2018 11:08:38 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 20cbd4f5f4d08bc26c22eb40b6c1e55b02e93f23
Author: Ludovic Courtès <address@hidden>
Date: Sat Sep 1 23:49:43 2018 +0200
compile-as-derivation: Adjust %load-compiled-path.
* build-aux/compile-as-derivation.scm: Set not only %load-path but also
%load-compiled-path. This can avoid problems where a stale .go is
loaded.
---
build-aux/compile-as-derivation.scm | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/build-aux/compile-as-derivation.scm
b/build-aux/compile-as-derivation.scm
index 59a84b1..d945a8c 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)
- branch master updated (87284c6 -> 2bd6ed9), Ludovic Courtès, 2018/09/02
- 07/07: gnu: haskell-mode: Fix test failure., Ludovic Courtès, 2018/09/02
- 06/07: gnu: emacs-helpful: Update to 0.13., Ludovic Courtès, 2018/09/02
- 02/07: discovery: Add 'scheme-modules*'., Ludovic Courtès, 2018/09/02
- 03/07: Add (guix describe) and use it to initialize '%package-search-path'., Ludovic Courtès, 2018/09/02
- 05/07: gnu: emacs-elisp-refs: Update to 1.3., Ludovic Courtès, 2018/09/02
- 04/07: Add (guix channels) and use it in (guix scripts pull)., Ludovic Courtès, 2018/09/02
- 01/07: compile-as-derivation: Adjust %load-compiled-path.,
Ludovic Courtès <=