Merge pull request #60543 from Infinisil/fix/znc-gen

nixos/znc: Fix config generator for certain null values
This commit is contained in:
Silvan Mosberger 2019-05-02 18:23:10 +02:00 committed by GitHub
commit e3dfd6a8ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,11 +47,11 @@ let
# Baz=baz
# Qux=qux
# </Foo>
set = concatMap (subname: [
set = concatMap (subname: optionals (value.${subname} != null) ([
"<${name} ${subname}>"
] ++ map (line: "\t${line}") (toLines value.${subname}) ++ [
"</${name}>"
]) (filter (v: v != null) (attrNames value));
])) (filter (v: v != null) (attrNames value));
}.${builtins.typeOf value};