services: configuration: Allow disabling serialization.
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>
Sat, 8 May 2021 01:46:51 +0000 (21:46 -0400)
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>
Sat, 8 May 2021 04:50:39 +0000 (00:50 -0400)
commit3f9a12dc082b20426fc740416601b69ea1897193
tree5cdb641aa666726334cbafb83cae18c281029479
parent1a2704add3be3938501083bdb7c74367a9fd7d81
services: configuration: Allow disabling serialization.

Serialization is not always useful, for example when deriving command line
arguments from a configuration.  This change provides a way to turn it off,
which removes the need to define a bunch of dummy serialization procedures.

Credit goes to Andrew Gierth (RhodiumToad) from #guile for providing the
solution.  Thank you!

* gnu/services/configuration.scm (define-configuration-helper): New procedure.
(define-configuration) <no-serialization>: New syntactic keyword.  Use it in a
new pattern.  Refactor the macro so that it makes use of the above helper
procedure.
gnu/services/configuration.scm