renderOptionValue
lib.options.renderOptionValue
Docs pulled from | This Revision | 10 minutes ago
Ensures that the given option value (default or example) is a _type
d string
by rendering Nix values to literalExpression
s.
Inputs
v
-
1. Function argument
Noogle detected
Implementation
The following is the current implementation of this function.
renderOptionValue =
v:
if v ? _type && v ? text then
v
else
literalExpression (
lib.generators.toPretty {
multiline = true;
allowPrettyValues = true;
} v
);