Browse Source

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.
gn-latest-20200428
Ludovic Courtès 2 years ago
parent
commit
20cbd4f5f4
No known key found for this signature in database GPG Key ID: 90B11993D9AEBB5
1 changed files with 14 additions and 7 deletions
  1. +14
    -7
      build-aux/compile-as-derivation.scm

+ 14
- 7
build-aux/compile-as-derivation.scm View File

@@ -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)


Loading…
Cancel
Save