diff options
author | Ludovic Courtès <ludo@gnu.org> | 2013-02-20 23:46:38 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2013-02-27 20:55:42 +0100 |
commit | 69ce1ffc7d5f12266e3a4cde605ca76a65c297b4 (patch) | |
tree | a45dcaab5c9c0b033a3392e12f6084e5c5b74686 /scripts/guix.in | |
parent | 7650e148f69832e6b89b93c549278b1bbf89946a (diff) | |
download | patches-69ce1ffc7d5f12266e3a4cde605ca76a65c297b4.tar patches-69ce1ffc7d5f12266e3a4cde605ca76a65c297b4.tar.gz |
Add "guix pull".
* guix/scripts/pull.scm: New file.
* Makefile.am (MODULES): Add it.
* doc/guix.texi (Invoking guix pull): New node.
(Invoking guix package): Add cross-ref to it.
* guix/ui.scm (config-directory): New procedure.
* scripts/guix.in: When `GUIX_UNINSTALLED' is undefined, add
$XDG_CONFIG_HOME/guix/latest to the search path.
* po/POTFILES.in: Add guix/scripts/pull.scm.
Diffstat (limited to 'scripts/guix.in')
-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 2fdde7d13a..1315789a9c 100644 --- a/scripts/guix.in +++ b/scripts/guix.in @@ -22,7 +22,8 @@ ;; IMPORTANT: We must avoid loading any modules from Guix here, ;; because we need to adjust the guile load paths first. ;; It's okay to import modules from core Guile though. -(use-modules (ice-9 regex)) +(use-modules (ice-9 regex) + (srfi srfi-26)) (let () (define-syntax-rule (push! elt v) (set! v (cons elt v))) @@ -45,7 +46,14 @@ (unless (getenv "GUIX_UNINSTALLED") (let ((module-dir (config-lookup "guilemoduledir"))) (push! module-dir %load-path) - (push! module-dir %load-compiled-path)))) + (push! module-dir %load-compiled-path)) + (let ((updates-dir (and=> (or (getenv "XDG_CONFIG_HOME") + (and=> (getenv "HOME") + (cut string-append <> "/.config"))) + (cut string-append <> "/guix/latest")))) + (when (file-exists? updates-dir) + (push! updates-dir %load-path) + (push! updates-dir %load-compiled-path))))) (define (run-guix-main) (let ((guix-main (module-ref (resolve-interface '(guix ui)) |