vm: Use more keyword parameters for `expression->derivation-in-linux-vm'.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Turn `system' and `inputs' into keyword parameters. (qemu-image, example1): Adjust accordingly.
This commit is contained in:
parent
858e92823f
commit
2455085a1e
|
@ -40,8 +40,10 @@
|
||||||
;;;
|
;;;
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(define* (expression->derivation-in-linux-vm store name system exp inputs
|
(define* (expression->derivation-in-linux-vm store name exp
|
||||||
#:key
|
#:key
|
||||||
|
(system (%current-system))
|
||||||
|
(inputs '())
|
||||||
(linux linux-libre)
|
(linux linux-libre)
|
||||||
(initrd qemu-initrd)
|
(initrd qemu-initrd)
|
||||||
(qemu qemu/smb-shares)
|
(qemu qemu/smb-shares)
|
||||||
|
@ -150,7 +152,7 @@ DISK-IMAGE-SIZE bytes and return it."
|
||||||
(inputs '()))
|
(inputs '()))
|
||||||
"Return a bootable, stand-alone QEMU image."
|
"Return a bootable, stand-alone QEMU image."
|
||||||
(expression->derivation-in-linux-vm
|
(expression->derivation-in-linux-vm
|
||||||
store "qemu-image" system
|
store "qemu-image"
|
||||||
`(let ((parted (string-append (assoc-ref %build-inputs "parted")
|
`(let ((parted (string-append (assoc-ref %build-inputs "parted")
|
||||||
"/sbin/parted"))
|
"/sbin/parted"))
|
||||||
(mkfs (string-append (assoc-ref %build-inputs "e2fsprogs")
|
(mkfs (string-append (assoc-ref %build-inputs "e2fsprogs")
|
||||||
|
@ -212,7 +214,8 @@ menuentry \"Boot-to-Guile! (GNU System technology preview)\" {
|
||||||
(zero?
|
(zero?
|
||||||
(system* umount "/fs"))
|
(system* umount "/fs"))
|
||||||
(reboot)))))))
|
(reboot)))))))
|
||||||
`(("parted" ,parted)
|
#:system system
|
||||||
|
#:inputs `(("parted" ,parted)
|
||||||
("grub" ,grub)
|
("grub" ,grub)
|
||||||
("e2fsprogs" ,e2fsprogs)
|
("e2fsprogs" ,e2fsprogs)
|
||||||
("linux" ,linux-libre)
|
("linux" ,linux-libre)
|
||||||
|
@ -241,13 +244,12 @@ menuentry \"Boot-to-Guile! (GNU System technology preview)\" {
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(parameterize ((%guile-for-build (package-derivation store guile-final)))
|
(parameterize ((%guile-for-build (package-derivation store guile-final)))
|
||||||
(expression->derivation-in-linux-vm
|
(expression->derivation-in-linux-vm
|
||||||
store "vm-test" (%current-system)
|
store "vm-test"
|
||||||
'(begin
|
'(begin
|
||||||
(display "hello from boot!\n")
|
(display "hello from boot!\n")
|
||||||
(call-with-output-file "/xchg/hello"
|
(call-with-output-file "/xchg/hello"
|
||||||
(lambda (p)
|
(lambda (p)
|
||||||
(display "world" p))))
|
(display "world" p)))))))
|
||||||
'())))
|
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(close-connection store)))))
|
(close-connection store)))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue