lib.generators.toPreserves: quote keys of attrsets

This commit is contained in:
Emery Hemingway 2022-02-26 16:58:08 -06:00 committed by Emery Hemingway
parent 3543097ce7
commit 2a44a15be1
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ in with lib; {
if isAttrs v then
"{ ${
concatItems (lib.attrsets.mapAttrsToList
(key: val: "${key}: ${toPreserves' val}") v)
(key: val: "${builtins.toJSON key}: ${toPreserves' val}") v)
} }"
else if isList v then
"[ ${concatItems (map toPreserves' v)} ]"