diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-05-16 21:56:00 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-05-16 21:56:00 +0200 |
commit | 7889394e059a2362d3227fb02256de4afd46129c (patch) | |
tree | c58a09e074643a0fe6657fb45b7fe3a9edfed40b | |
parent | 90f69c2ec598b7a94b7d35e4ce61bda245369b6d (diff) | |
download | patches-7889394e059a2362d3227fb02256de4afd46129c.tar patches-7889394e059a2362d3227fb02256de4afd46129c.tar.gz |
guix system: Add 'build' action.
* guix/scripts/system.scm (show-help): Document 'build' action.
(guix-system): Honor 'build' action.
* doc/guix.texi (Invoking guix system): Add 'build' action.
-rw-r--r-- | doc/guix.texi | 5 | ||||
-rw-r--r-- | guix/scripts/system.scm | 19 |
2 files changed, 18 insertions, 6 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index 770e7ab062..4881ec6e1b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -3204,6 +3204,11 @@ operating system is instantiate. Currently the following values are supported: @table @code +@item build +Build the operating system's derivation, which includes all the +configuration files and programs needed to boot and run the system. +This action does not actually install anything. + @item vm @cindex virtual machine Build a virtual machine that contain the operating system declared in diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 582027244c..0739534b57 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -24,6 +24,7 @@ #:use-module (guix utils) #:use-module (guix monads) #:use-module (guix scripts build) + #:use-module (gnu system) #:use-module (gnu system vm) #:use-module (srfi srfi-1) #:use-module (srfi srfi-37) @@ -71,9 +72,15 @@ (define (show-help) (display (_ "Usage: guix system [OPTION] ACTION FILE Build the operating system declared in FILE according to ACTION.\n")) - (display (_ "Currently the only valid values for ACTION are 'vm', which builds -a virtual machine of the given operating system that shares the host's store, -and 'vm-image', which builds a virtual machine image that stands alone.\n")) + (newline) + (display (_ "The valid values for ACTION are:\n")) + (display (_ "\ + - 'build', build the operating system without installing anything\n")) + (display (_ "\ + - 'vm', build a virtual machine image that shares the host's store\n")) + (display (_ "\ + - 'vm-image', build a freestanding virtual machine image.\n")) + (show-build-options-help) (display (_ " --image-size=SIZE for 'vm-image', produce an image of SIZE")) @@ -131,9 +138,7 @@ and 'vm-image', which builds a virtual machine image that stands alone.\n")) (alist-cons 'argument arg result))) (let ((action (string->symbol arg))) (case action - ((vm) - (alist-cons 'action action result)) - ((vm-image) + ((build vm vm-image) (alist-cons 'action action result)) (else (leave (_ "~a: unknown action~%") action)))))) @@ -147,6 +152,8 @@ and 'vm-image', which builds a virtual machine image that stands alone.\n")) (read-operating-system file) (leave (_ "no configuration file specified~%")))) (mdrv (case action + ((build) + (operating-system-derivation os)) ((vm-image) (let ((size (assoc-ref opts 'image-size))) (system-qemu-image os |