aboutsummaryrefslogtreecommitdiff
path: root/gnu/build
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-04-01 15:03:10 +0200
committerLudovic Courtès <ludo@gnu.org>2020-04-11 19:22:25 +0200
commit82782d8cecec974c03ec95824f62455f0a795815 (patch)
tree37747710781a7442ab283ae54821a3e6155b4d71 /gnu/build
parent87241947aa2c0148a6f06989057a113c57ea9208 (diff)
downloadguix-82782d8cecec974c03ec95824f62455f0a795815.tar
guix-82782d8cecec974c03ec95824f62455f0a795815.tar.gz
vm: 'qemu-image' accepts a list of extra populate directives.
* gnu/build/vm.scm (root-partition-initializer): Add #:extra-directives parameter and pass it to 'populate-root-file-system'. * gnu/system/vm.scm (qemu-image): Add #:extra-directives parameter and pass it to 'root-partition-initializer'.
Diffstat (limited to 'gnu/build')
-rw-r--r--gnu/build/vm.scm11
1 files changed, 8 insertions, 3 deletions
diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm
index 9caa110463..dfb1465fd5 100644
--- a/gnu/build/vm.scm
+++ b/gnu/build/vm.scm
@@ -363,14 +363,18 @@ it, run its initializer, and unmount it."
copy-closures?
(register-closures? #t)
system-directory
- (deduplicate? #t))
+ (deduplicate? #t)
+ (extra-directives '()))
"Return a procedure to initialize a root partition.
If REGISTER-CLOSURES? is true, register all of CLOSURES in the partition's
store. If DEDUPLICATE? is true, then also deduplicate files common to
CLOSURES and the rest of the store when registering the closures. If
COPY-CLOSURES? is true, copy all of CLOSURES to the partition.
-SYSTEM-DIRECTORY is the name of the directory of the 'system' derivation."
+SYSTEM-DIRECTORY is the name of the directory of the 'system' derivation.
+
+EXTRA-DIRECTIVES is an optional list of directives to populate the root file
+system that is passed to 'populate-root-file-system'."
(lambda (target)
(define target-store
(string-append target (%store-directory)))
@@ -403,7 +407,8 @@ SYSTEM-DIRECTORY is the name of the directory of the 'system' derivation."
;; Add the non-store directories and files.
(display "populating...\n")
- (populate-root-file-system system-directory target)
+ (populate-root-file-system system-directory target
+ #:extras extra-directives)
;; 'register-closure' resets timestamps and everything, so no need to do it
;; once more in that case.