diff options
author | Ludovic Courtès <ludo@gnu.org> | 2018-11-15 18:39:18 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-11-18 23:37:44 +0100 |
commit | e34ae75dc14acb97f661a2787a3c626d7ce65b24 (patch) | |
tree | 54735b47e5ba6745355e26359ad4e4b7e36454b5 /gnu/system/vm.scm | |
parent | a7ef45d9de8c6b0d584769404c8754cd3da8fe29 (diff) | |
download | patches-e34ae75dc14acb97f661a2787a3c626d7ce65b24.tar patches-e34ae75dc14acb97f661a2787a3c626d7ce65b24.tar.gz |
linux-initrd: Return file-like objects instead of monadic values.
This is an incompatible change visible to users via the 'initrd' field
of 'operating-system'. However, assuming the user's 'initrd' value
tail-calls to 'raw-initrd' or 'base-initrd', the switch to non-monadic
style is invisible.
* gnu/system/linux-initrd.scm (expression->initrd): Use 'computed-file'
instead of 'gexp->derivation'.
(raw-initrd, base-initrd): Adjust docstring to mention non-monadic
return.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Adjust
accordingly.
* gnu/system.scm (operating-system-directory-base-entries)
(operating-system-initrd-file)
(operating-system-boot-parameters): Adjust accordingly.
* doc/guix.texi (operating-system Reference)
(Initial RAM Disk): Update.
Diffstat (limited to 'gnu/system/vm.scm')
-rw-r--r-- | gnu/system/vm.scm | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index d43b71cbaf..6064e0f899 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -189,14 +189,12 @@ made available under the /xchg CIFS share." #~(when (zero? (system* #$user-builder)) (reboot)))) - (mlet* %store-monad - ((initrd (if initrd ; use the default initrd? - (return initrd) - (base-initrd file-systems - #:on-error 'backtrace - #:linux linux - #:linux-modules %base-initrd-modules - #:qemu-networking? #t)))) + (let ((initrd (or initrd + (base-initrd file-systems + #:on-error 'backtrace + #:linux linux + #:linux-modules %base-initrd-modules + #:qemu-networking? #t)))) (define builder ;; Code that launches the VM that evaluates EXP. |