aboutsummaryrefslogtreecommitdiff
path: root/gnu/services/configuration.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-05-17 10:18:34 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-05-17 23:27:40 -0400
commitcdd1e15a250238631afb3c97ca362bf719ae8039 (patch)
tree703e0764b4a2f06e80a070928f65b5f106519903 /gnu/services/configuration.scm
parentb7297d66c58b4fe2c153dce4f1069235269cd005 (diff)
downloadguix-cdd1e15a250238631afb3c97ca362bf719ae8039.tar
guix-cdd1e15a250238631afb3c97ca362bf719ae8039.tar.gz
services: configuration: Add a define-configuration/no-serialization syntax.
This is added for convenience and for uniformity with the define-maybe/no-serialization syntax introduced in the previous commit. * gnu/services/configuration.scm (define-configuration/no-serialization): New syntax.
Diffstat (limited to 'gnu/services/configuration.scm')
-rw-r--r--gnu/services/configuration.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/gnu/services/configuration.scm b/gnu/services/configuration.scm
index 72b1d1cec6..f23840ee6d 100644
--- a/gnu/services/configuration.scm
+++ b/gnu/services/configuration.scm
@@ -44,6 +44,7 @@
configuration-error?
define-configuration
+ define-configuration/no-serialization
no-serialization
serialize-configuration
@@ -222,6 +223,13 @@ does not have a default value" field kind)))
#t #'(_ stem (field (field-type def ...) doc custom-serializer ...)
...))))))
+(define-syntax-rule (define-configuration/no-serialization
+ stem (field (field-type def ...)
+ doc custom-serializer ...) ...)
+ (define-configuration stem (field (field-type def ...)
+ doc custom-serializer ...) ...
+ (no-serialization)))
+
(define (empty-serializer field-name val) "")
(define serialize-package empty-serializer)