From cdd1e15a250238631afb3c97ca362bf719ae8039 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 17 May 2021 10:18:34 -0400 Subject: 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. --- gnu/services/configuration.scm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gnu') 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 @@ (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) -- cgit v1.2.3