diff options
Diffstat (limited to 'scripts/guix.in')
| -rw-r--r-- | scripts/guix.in | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/guix.in b/scripts/guix.in index 5d6921dd09d..e20c274242a 100644 --- a/scripts/guix.in +++ b/scripts/guix.in | |||
| @@ -30,10 +30,12 @@ | |||
| 30 | 30 | ||
| 31 | (define config-lookup | 31 | (define config-lookup |
| 32 | (let ((config '(("prefix" . "@prefix@") | 32 | (let ((config '(("prefix" . "@prefix@") |
| 33 | ("exec_prefix" . "@exec_prefix@") | ||
| 33 | ("datarootdir" . "@datarootdir@") | 34 | ("datarootdir" . "@datarootdir@") |
| 34 | ("guilemoduledir" . "@guilemoduledir@") | 35 | ("guilemoduledir" . "@guilemoduledir@") |
| 36 | ("guileobjectdir" . "@guileobjectdir@") | ||
| 35 | ("localedir" . "@localedir@"))) | 37 | ("localedir" . "@localedir@"))) |
| 36 | (var-ref-regexp (make-regexp "\\$\\{([a-z]+)\\}"))) | 38 | (var-ref-regexp (make-regexp "\\$\\{([a-z_]+)\\}"))) |
| 37 | (define (expand-var-ref match) | 39 | (define (expand-var-ref match) |
| 38 | (lookup (match:substring match 1))) | 40 | (lookup (match:substring match 1))) |
| 39 | (define (expand str) | 41 | (define (expand str) |
| @@ -45,14 +47,17 @@ | |||
| 45 | 47 | ||
| 46 | (define (maybe-augment-load-paths!) | 48 | (define (maybe-augment-load-paths!) |
| 47 | (unless (getenv "GUIX_UNINSTALLED") | 49 | (unless (getenv "GUIX_UNINSTALLED") |
| 48 | (let ((module-dir (config-lookup "guilemoduledir"))) | 50 | (let ((module-dir (config-lookup "guilemoduledir")) |
| 51 | (object-dir (config-lookup "guileobjectdir"))) | ||
| 49 | (push! module-dir %load-path) | 52 | (push! module-dir %load-path) |
| 50 | (push! module-dir %load-compiled-path)) | 53 | (push! object-dir %load-compiled-path)) |
| 51 | (let ((updates-dir (and=> (or (getenv "XDG_CONFIG_HOME") | 54 | (let ((updates-dir (and=> (or (getenv "XDG_CONFIG_HOME") |
| 52 | (and=> (getenv "HOME") | 55 | (and=> (getenv "HOME") |
| 53 | (cut string-append <> "/.config"))) | 56 | (cut string-append <> "/.config"))) |
| 54 | (cut string-append <> "/guix/latest")))) | 57 | (cut string-append <> "/guix/latest")))) |
| 55 | (when (and updates-dir (file-exists? updates-dir)) | 58 | (when (and updates-dir (file-exists? updates-dir)) |
| 59 | ;; XXX: Currently 'guix pull' puts both .scm and .go files in | ||
| 60 | ;; UPDATES-DIR. | ||
| 56 | (push! updates-dir %load-path) | 61 | (push! updates-dir %load-path) |
| 57 | (push! updates-dir %load-compiled-path))))) | 62 | (push! updates-dir %load-compiled-path))))) |
| 58 | 63 | ||
