mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-26 06:18:07 -05:00
deploy: Handle the '--system' command line option.
* guix/scripts/deploy.scm (show-help): Add help for '--system'. (%options): Add '-s' and '--system'. (guix-deploy): Parameterize %current-system.
This commit is contained in:
parent
2fa23d8f5c
commit
3c618b9894
1 changed files with 10 additions and 2 deletions
|
@ -23,6 +23,7 @@ (define-module (guix scripts deploy)
|
||||||
#:use-module (guix scripts build)
|
#:use-module (guix scripts build)
|
||||||
#:use-module (guix store)
|
#:use-module (guix store)
|
||||||
#:use-module (guix ui)
|
#:use-module (guix ui)
|
||||||
|
#:use-module (guix utils)
|
||||||
#:use-module (guix grafts)
|
#:use-module (guix grafts)
|
||||||
#:use-module (ice-9 format)
|
#:use-module (ice-9 format)
|
||||||
#:use-module (srfi srfi-1)
|
#:use-module (srfi srfi-1)
|
||||||
|
@ -41,6 +42,8 @@ (define-module (guix scripts deploy)
|
||||||
(define (show-help)
|
(define (show-help)
|
||||||
(display (G_ "Usage: guix deploy [OPTION] FILE...
|
(display (G_ "Usage: guix deploy [OPTION] FILE...
|
||||||
Perform the deployment specified by FILE.\n"))
|
Perform the deployment specified by FILE.\n"))
|
||||||
|
(display (G_ "
|
||||||
|
-s, --system=SYSTEM attempt to build for SYSTEM--e.g., \"i686-linux\""))
|
||||||
(show-build-options-help)
|
(show-build-options-help)
|
||||||
(newline)
|
(newline)
|
||||||
(display (G_ "
|
(display (G_ "
|
||||||
|
@ -55,10 +58,14 @@ (define %options
|
||||||
(lambda args
|
(lambda args
|
||||||
(show-help)
|
(show-help)
|
||||||
(exit 0)))
|
(exit 0)))
|
||||||
|
(option '(#\s "system") #t #f
|
||||||
|
(lambda (opt name arg result)
|
||||||
|
(alist-cons 'system arg
|
||||||
|
(alist-delete 'system result eq?))))
|
||||||
%standard-build-options))
|
%standard-build-options))
|
||||||
|
|
||||||
(define %default-options
|
(define %default-options
|
||||||
'((system . ,(%current-system))
|
`((system . ,(%current-system))
|
||||||
(substitutes? . #t)
|
(substitutes? . #t)
|
||||||
(build-hook? . #t)
|
(build-hook? . #t)
|
||||||
(graft? . #t)
|
(graft? . #t)
|
||||||
|
@ -81,6 +88,7 @@ (define (handle-argument arg result)
|
||||||
(set-build-options-from-command-line store opts)
|
(set-build-options-from-command-line store opts)
|
||||||
(for-each (lambda (machine)
|
(for-each (lambda (machine)
|
||||||
(info (G_ "deploying to ~a...") (machine-display-name machine))
|
(info (G_ "deploying to ~a...") (machine-display-name machine))
|
||||||
(parameterize ((%graft? (assq-ref opts 'graft?)))
|
(parameterize ((%current-system (assq-ref opts 'system))
|
||||||
|
(%graft? (assq-ref opts 'graft?)))
|
||||||
(run-with-store store (deploy-machine machine))))
|
(run-with-store store (deploy-machine machine))))
|
||||||
machines))))
|
machines))))
|
||||||
|
|
Loading…
Reference in a new issue