aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2024-10-30 22:21:18 +0900
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2025-02-13 00:07:21 +0900
commitb78794f96d070c8df42276398743808cf3ed4853 (patch)
treed61cf786f76014a6058745ee66e40c8998ca72fa
parent7e5283e8553455165feaaab4238ead112cf38784 (diff)
downloadguix-b78794f96d070c8df42276398743808cf3ed4853.tar.gz
guix-b78794f96d070c8df42276398743808cf3ed4853.zip
system/vm: Fix virtual-machine bug.
The virtual-machine syntax would not accept a single operating-system field, which was puzzling. * gnu/system/vm.scm (virtual-machine): Add a pattern matching a single literal 'operating-system' field and value. Change-Id: If207fd71df3a3f763b2e63229eafa82f63e80773
-rw-r--r--gnu/system/vm.scm8
1 files changed, 6 insertions, 2 deletions
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index a2743453e7..4a400056d7 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -422,10 +422,14 @@ host."
(default #f)))
(define-syntax virtual-machine
- (syntax-rules ()
+ (syntax-rules (operating-system)
"Declare a virtual machine running the specified OS, with the given
options."
- ((_ os) ;shortcut
+ ((_ (operating-system os))
+ ;; Also accept the long form (virtual-machine (operating-system os)), for
+ ;; correctness.
+ (%virtual-machine (operating-system os)))
+ ((_ os) ;shortcut
(%virtual-machine (operating-system os)))
((_ fields ...)
(%virtual-machine fields ...))))