pull: Add '--system'.

* guix/scripts/pull.scm (%options): Add '--system'.
(guix-pull): Honor it.
* doc/guix.texi (Invoking guix pull): Document it.
This commit is contained in:
Ludovic Courtès 2018-12-27 11:54:55 +01:00
parent ad3c9fbbb9
commit 5923102f7b
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
2 changed files with 11 additions and 1 deletions

View file

@ -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 Show which channel commit(s) would be used and what would be built or
substituted but do not actually do it. substituted but do not actually do it.
@item --system=@var{system}
@itemx -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 @item --verbose
Produce verbose output, writing build logs to the standard error output. Produce verbose output, writing build logs to the standard error output.

View file

@ -126,6 +126,10 @@ (define %options
(lambda (opt name arg result) (lambda (opt name arg result)
(alist-cons 'profile (canonicalize-profile arg) (alist-cons 'profile (canonicalize-profile arg)
result))) 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 (option '(#\n "dry-run") #f #f
(lambda (opt name arg result) (lambda (opt name arg result)
(alist-cons 'dry-run? #t (alist-cons 'graft? #f result)))) (alist-cons 'dry-run? #t (alist-cons 'graft? #f result))))
@ -505,7 +509,8 @@ (define (guix-pull . args)
(else (else
(with-store store (with-store store
(with-status-report print-build-event (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)) (%repository-cache-directory cache))
(set-build-options-from-command-line store opts) (set-build-options-from-command-line store opts)
(honor-x509-certificates store) (honor-x509-certificates store)