summaryrefslogtreecommitdiff
path: root/gnu/system/vm.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-07-18 21:38:16 +0200
committerLudovic Courtès <ludo@gnu.org>2017-07-18 21:41:35 +0200
commit8d033e3e1607d5722ef7288208551d0331c8a853 (patch)
tree99ef8e9d5b492ab35516489d6b35211f15cc3dea /gnu/system/vm.scm
parent45c18f8529ed25729e9cbdfeeda4aed3c965180d (diff)
downloadpatches-8d033e3e1607d5722ef7288208551d0331c8a853.tar
patches-8d033e3e1607d5722ef7288208551d0331c8a853.tar.gz
vm: 'iso9660-image' produces a single-file output.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Add #:single-file-output? and pass it to 'load-in-linux-vm'. (iso9660-image): Pass #:single-file-output? to 'expression->derivation-in-linux-vm'. * gnu/build/vm.scm (load-in-linux-vm): Add #:single-file-output? and honor it.
Diffstat (limited to 'gnu/system/vm.scm')
-rw-r--r--gnu/system/vm.scm13
1 files changed, 9 insertions, 4 deletions
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index 028649f80b..6f979aee43 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -105,16 +105,19 @@
(guile-for-build
(%guile-for-build))
+ (single-file-output? #f)
(make-disk-image? #f)
(references-graphs #f)
(memory-size 256)
(disk-image-format "qcow2")
(disk-image-size 'guess))
"Evaluate EXP in a QEMU virtual machine running LINUX with INITRD (a
-derivation). In the virtual machine, EXP has access to all its inputs from the
-store; it should put its output files in the `/xchg' directory, which is
-copied to the derivation's output when the VM terminates. The virtual machine
-runs with MEMORY-SIZE MiB of memory.
+derivation). The virtual machine runs with MEMORY-SIZE MiB of memory. In the
+virtual machine, EXP has access to all its inputs from the store; it should
+put its output file(s) in the '/xchg' directory.
+
+If SINGLE-FILE-OUTPUT? is true, copy a single file from '/xchg' to OUTPUT.
+Otherwise, copy the contents of /xchg to a new directory OUTPUT.
When MAKE-DISK-IMAGE? is true, then create a QEMU disk image of type
DISK-IMAGE-FORMAT (e.g., 'qcow2' or 'raw'), of DISK-IMAGE-SIZE bytes and
@@ -164,6 +167,7 @@ made available under the /xchg CIFS share."
#:linux linux #:initrd initrd
#:memory-size #$memory-size
#:make-disk-image? #$make-disk-image?
+ #:single-file-output? #$single-file-output?
#:disk-image-format #$disk-image-format
#:disk-image-size size
#:references-graphs graphs)))))
@@ -219,6 +223,7 @@ INPUTS is a list of inputs (as for packages)."
(reboot))))
#:system system
#:make-disk-image? #f
+ #:single-file-output? #t
#:references-graphs inputs))
(define* (qemu-image #:key