mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
lib.generators: made toLua accept derivations too
While trying to extend generateLuarocksConfig, I had infinite loops caused by toLua considering derivations as attrSets
This commit is contained in:
parent
d4af6e420f
commit
4ea6c0c58b
@ -525,6 +525,8 @@ ${expr "" v}
|
|||||||
"(${v.expr})"
|
"(${v.expr})"
|
||||||
else if v == { } then
|
else if v == { } then
|
||||||
"{}"
|
"{}"
|
||||||
|
else if libAttr.isDerivation v then
|
||||||
|
''"${toString v}"''
|
||||||
else
|
else
|
||||||
"{${introSpace}${concatItems (
|
"{${introSpace}${concatItems (
|
||||||
lib.attrsets.mapAttrsToList (key: value: "[${builtins.toJSON key}] = ${toLua innerArgs value}") v
|
lib.attrsets.mapAttrsToList (key: value: "[${builtins.toJSON key}] = ${toLua innerArgs value}") v
|
||||||
|
Loading…
Reference in New Issue
Block a user