hnix/tests/eval-compare/builtins.toJSON.nix

8 lines
261 B
Nix
Raw Permalink Normal View History

2018-12-05 21:01:55 +01:00
with builtins;
let f = toFile "foo" "foo contents"; # /nix/store/pqwdc5m06lxl8gmzcd26ifwsdhq9fj7k-foo
objA = { a = 15; b = substring 1 3 (dirOf f); };
objB = { a = 42; b = "hello"; };
in [ (hasContext (toJSON objA))
(hasContext (toJSON objB))
]