summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/guix.in14
1 files changed, 1 insertions, 13 deletions
diff --git a/scripts/guix.in b/scripts/guix.in
index d1c12eae5c4..0a3ab1f64df 100644
--- a/scripts/guix.in
+++ b/scripts/guix.in
@@ -23,25 +23,13 @@
23;; IMPORTANT: We must avoid loading any modules from Guix here, 23;; IMPORTANT: We must avoid loading any modules from Guix here,
24;; because we need to adjust the guile load paths first. 24;; because we need to adjust the guile load paths first.
25;; It's okay to import modules from core Guile though. 25;; It's okay to import modules from core Guile though.
26(use-modules (srfi srfi-26))
27 26
28(define-syntax-rule (push! elt v) (set! v (cons elt v))) 27(define-syntax-rule (push! elt v) (set! v (cons elt v)))
29 28
30(define (augment-load-paths!) 29(define (augment-load-paths!)
31 ;; Add installed modules to load-path. 30 ;; Add installed modules to load-path.
32 (push! "@guilemoduledir@" %load-path) 31 (push! "@guilemoduledir@" %load-path)
33 (push! "@guileobjectdir@" %load-compiled-path) 32 (push! "@guileobjectdir@" %load-compiled-path))
34
35 ;; Add modules fetched by 'guix pull' to load-path.
36 (let ((updates-dir (and=> (or (getenv "XDG_CONFIG_HOME")
37 (and=> (getenv "HOME")
38 (cut string-append <> "/.config")))
39 (cut string-append <> "/guix/latest"))))
40 (when (and=> updates-dir file-exists?)
41 ;; XXX: Currently 'guix pull' puts both .scm and .go files in
42 ;; UPDATES-DIR.
43 (push! updates-dir %load-path)
44 (push! updates-dir %load-compiled-path))))
45 33
46(define* (main #:optional (args (command-line))) 34(define* (main #:optional (args (command-line)))
47 (unless (getenv "GUIX_UNINSTALLED") 35 (unless (getenv "GUIX_UNINSTALLED")