diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/guix.in | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/scripts/guix.in b/scripts/guix.in index 2fdde7d13a8..1315789a9c9 100644 --- a/scripts/guix.in +++ b/scripts/guix.in | |||
| @@ -22,7 +22,8 @@ | |||
| 22 | ;; IMPORTANT: We must avoid loading any modules from Guix here, | 22 | ;; IMPORTANT: We must avoid loading any modules from Guix here, |
| 23 | ;; because we need to adjust the guile load paths first. | 23 | ;; because we need to adjust the guile load paths first. |
| 24 | ;; It's okay to import modules from core Guile though. | 24 | ;; It's okay to import modules from core Guile though. |
| 25 | (use-modules (ice-9 regex)) | 25 | (use-modules (ice-9 regex) |
| 26 | (srfi srfi-26)) | ||
| 26 | 27 | ||
| 27 | (let () | 28 | (let () |
| 28 | (define-syntax-rule (push! elt v) (set! v (cons elt v))) | 29 | (define-syntax-rule (push! elt v) (set! v (cons elt v))) |
| @@ -45,7 +46,14 @@ | |||
| 45 | (unless (getenv "GUIX_UNINSTALLED") | 46 | (unless (getenv "GUIX_UNINSTALLED") |
| 46 | (let ((module-dir (config-lookup "guilemoduledir"))) | 47 | (let ((module-dir (config-lookup "guilemoduledir"))) |
| 47 | (push! module-dir %load-path) | 48 | (push! module-dir %load-path) |
| 48 | (push! module-dir %load-compiled-path)))) | 49 | (push! module-dir %load-compiled-path)) |
| 50 | (let ((updates-dir (and=> (or (getenv "XDG_CONFIG_HOME") | ||
| 51 | (and=> (getenv "HOME") | ||
| 52 | (cut string-append <> "/.config"))) | ||
| 53 | (cut string-append <> "/guix/latest")))) | ||
| 54 | (when (file-exists? updates-dir) | ||
| 55 | (push! updates-dir %load-path) | ||
| 56 | (push! updates-dir %load-compiled-path))))) | ||
| 49 | 57 | ||
| 50 | (define (run-guix-main) | 58 | (define (run-guix-main) |
| 51 | (let ((guix-main (module-ref (resolve-interface '(guix ui)) | 59 | (let ((guix-main (module-ref (resolve-interface '(guix ui)) |
