1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

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.
This commit is contained in:
Ludovic Courtès
2013-02-20 23:46:38 +01:00
parent 9bb2b96aab
commit f651b477b7
6 changed files with 288 additions and 2 deletions

View File

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