mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 05:48:07 -05:00
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:
parent
b7297d66c5
commit
cdd1e15a25
1 changed files with 8 additions and 0 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue