summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-05-30 17:50:21 +0200
committerLudovic Courtès <ludo@gnu.org>2018-06-09 12:02:27 +0200
commit75e24d7b0e19ab2164aecb340e82d07d2b9714e7 (patch)
tree7e46b4d70532dc16482c57f94b6257b42600c04b /scripts
parent8a0d9bc8a3f153159d9e239a151c0fa98f1e12d8 (diff)
pull: Install the new Guix in a profile.
* guix/scripts/pull.scm (%pull-version): New variable. (build-from-source): Pass #:pull-version to BUILD. (whole-package-for-legacy, derivation->manifest-entry): New procedure. (build-and-install): Rewrite in terms of 'build-and-use-profile'. * guix/scripts/system.scm (maybe-suggest-running-guix-pull)[latest]: Switch to "/current". * scripts/guix.in (augment-load-paths!): Remove use of ~/.config/guix/latest. * build-aux/compile-as-derivation.scm: Replace "/guix/latest/" with "/current/share/guile/site/X.Y" * guix/scripts.scm (warn-about-old-distro)[age]: Check "/current" instead of "/latest". * doc/guix.texi (Invoking guix pull): Document it. * doc/contributing.texi (Running Guix Before It Is Installed): Remove footnote about abusing ~/.config/guix/latest.
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")