summaryrefslogtreecommitdiff
path: root/guix/scripts/deploy.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-07-31 14:28:56 +0200
committerMarius Bakke <mbakke@fastmail.com>2019-07-31 14:28:56 +0200
commit6a2e54236e1b2c428c8fd478ee0f3bd8130703fa (patch)
treeaf70155a2f474d35d90d003f8584b2d9ee0bbaa8 /guix/scripts/deploy.scm
parent2cf1e37c109c8d03fae75bc84f7012f3afa956e5 (diff)
parent3d88855dfdcc4c8ce11f494fdf9f0ac1d8eef530 (diff)
downloadguix-patches-6a2e54236e1b2c428c8fd478ee0f3bd8130703fa.tar
guix-patches-6a2e54236e1b2c428c8fd478ee0f3bd8130703fa.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/scripts/deploy.scm')
-rw-r--r--guix/scripts/deploy.scm14
1 files changed, 12 insertions, 2 deletions
diff --git a/guix/scripts/deploy.scm b/guix/scripts/deploy.scm
index 978cfb2a81..52bba3f3bf 100644
--- a/guix/scripts/deploy.scm
+++ b/guix/scripts/deploy.scm
@@ -23,6 +23,8 @@
#:use-module (guix scripts build)
#:use-module (guix store)
#:use-module (guix ui)
+ #:use-module (guix utils)
+ #:use-module (guix grafts)
#:use-module (ice-9 format)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-37)
@@ -40,6 +42,8 @@
(define (show-help)
(display (G_ "Usage: guix deploy [OPTION] FILE...
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)
(newline)
(display (G_ "
@@ -54,10 +58,14 @@ Perform the deployment specified by FILE.\n"))
(lambda args
(show-help)
(exit 0)))
+ (option '(#\s "system") #t #f
+ (lambda (opt name arg result)
+ (alist-cons 'system arg
+ (alist-delete 'system result eq?))))
%standard-build-options))
(define %default-options
- '((system . ,(%current-system))
+ `((system . ,(%current-system))
(substitutes? . #t)
(build-hook? . #t)
(graft? . #t)
@@ -80,5 +88,7 @@ Perform the deployment specified by FILE.\n"))
(set-build-options-from-command-line store opts)
(for-each (lambda (machine)
(info (G_ "deploying to ~a...") (machine-display-name machine))
- (run-with-store store (deploy-machine machine)))
+ (parameterize ((%current-system (assq-ref opts 'system))
+ (%graft? (assq-ref opts 'graft?)))
+ (run-with-store store (deploy-machine machine))))
machines))))