lib.toC: admit int

This commit is contained in:
tv 2022-01-04 00:55:22 +01:00
parent 853e54ec84
commit d7edeeac50
1 changed files with 1 additions and 0 deletions

View File

@ -52,6 +52,7 @@ let
type = typeOf x;
reject = throw "cannot convert ${type}";
in {
int = toJSON x; # close enough
list = "{ ${concatStringsSep ", " (map toC x)} }";
null = "NULL";
set = if isDerivation x then toJSON x else reject;