guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/03: pull: Add '--system'.


From: guix-commits
Subject: 02/03: pull: Add '--system'.
Date: Thu, 27 Dec 2018 06:08:38 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 5923102f7b58f0a0120926ec5b81ed48b26a188e
Author: Ludovic Courtès <address@hidden>
Date:   Thu Dec 27 11:54:55 2018 +0100

    pull: Add '--system'.
    
    * guix/scripts/pull.scm (%options): Add '--system'.
    (guix-pull): Honor it.
    * doc/guix.texi (Invoking guix pull): Document it.
---
 doc/guix.texi         | 5 +++++
 guix/scripts/pull.scm | 7 ++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index c182995..20952e9 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -2887,6 +2887,11 @@ Use @var{profile} instead of 
@file{~/.config/guix/current}.
 Show which channel commit(s) would be used and what would be built or
 substituted but do not actually do it.
 
address@hidden address@hidden
address@hidden -s @var{system}
+Attempt to build for @var{system}---e.g., @code{i686-linux}---instead of
+the system type of the build host.
+
 @item --verbose
 Produce verbose output, writing build logs to the standard error output.
 
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index dc83729..862556d 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -126,6 +126,10 @@ Download and deploy the latest version of Guix.\n"))
                  (lambda (opt name arg result)
                    (alist-cons 'profile (canonicalize-profile arg)
                                result)))
+         (option '(#\s "system") #t #f
+                 (lambda (opt name arg result)
+                   (alist-cons 'system arg
+                               (alist-delete 'system result eq?))))
          (option '(#\n "dry-run") #f #f
                  (lambda (opt name arg result)
                    (alist-cons 'dry-run? #t (alist-cons 'graft? #f result))))
@@ -505,7 +509,8 @@ Use '~/.config/guix/channels.scm' instead."))
              (else
               (with-store store
                 (with-status-report print-build-event
-                  (parameterize ((%graft? (assoc-ref opts 'graft?))
+                  (parameterize ((%current-system (assoc-ref opts 'system))
+                                 (%graft? (assoc-ref opts 'graft?))
                                  (%repository-cache-directory cache))
                     (set-build-options-from-command-line store opts)
                     (honor-x509-certificates store)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]