summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2022-01-04 00:55:22 +0100
committertv <tv@krebsco.de>2022-01-04 00:55:22 +0100
commitd7edeeac5071ae96e60303a76ff32df2fca98db9 (patch)
tree7ef0d11dbced92b9832f54b907d6ae559c2beae7
parent853e54ec8458d9fa1222fb72f9871427d45fd8eb (diff)
lib.toC: admit int
-rw-r--r--lib/default.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/default.nix b/lib/default.nix
index 574713e48..94a81439e 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -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;