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.
This commit is contained in:
Maxim Cournoyer 2021-05-17 10:18:34 -04:00
parent b7297d66c5
commit cdd1e15a25
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -44,6 +44,7 @@ (define-module (gnu services configuration)
configuration-error?
define-configuration
define-configuration/no-serialization
no-serialization
serialize-configuration
@ -222,6 +223,13 @@ (define-configuration-helper
#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)