summary refs log tree commit diff
path: root/tests/guix-environment.sh
diff options
context:
space:
mode:
authorBruno Victal <mirai@makinata.eu>2023-03-26 19:41:29 +0100
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2023-04-02 12:31:51 +0200
commit6f48efa9b89f3c33f7b2827cae88e87ec64faa09 (patch)
tree23a236dd58239e625aa540d68cbd833f40371af5 /tests/guix-environment.sh
parent2ebbe8e9df66d6607cafa38a79926e4c9ac0d151 (diff)
downloadguix-6f48efa9b89f3c33f7b2827cae88e87ec64faa09.tar.gz
services: configuration: Add user-defined sanitizer support.
This changes the 'custom-serializer' field into a generic
'extra-args' field that can be extended to support new literals.
Within extra-args, the literals 'sanitizer' and 'serializer' allow
for user-defined sanitization and serialization procedures respectively.
The 'empty-serializer' was also added as a literal to be used as before.

To prevent confusion between the new “explicit” style of specifying
a sanitizer, and the old “implicit” style, the latter has been
deprecated, and a warning is issued if it is encountered.

* gnu/services/configuration.scm (define-configuration-helper):
Rename 'custom-serializer' to 'extra-args'.  Add support for literals
'sanitizer', 'serializer' and 'empty-serializer'.  Rename procedure
'field-sanitizer' to 'default-field-sanitizer' to avoid syntax clash.
Only define default field sanitizers if user-defined ones are absent.
(normalize-extra-args): New variable.
(<configuration-field>)[sanitizer]: New field.
* doc/guix.texi (Complex Configurations): Document the newly added
literals.
* tests/services/configuration.scm: Add tests for the new literals.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
Diffstat (limited to 'tests/guix-environment.sh')
0 files changed, 0 insertions, 0 deletions