2 `dhallToNix` is a utility function to convert expressions in the Dhall
3 configuration language to their corresponding Nix expressions.
6 dhallToNix "{ foo = 1, bar = True }"
7 => { foo = 1; bar = true; }
8 dhallToNix "λ(x : Bool) → x == False"
10 dhallToNix "λ(x : Bool) → x == False" false
13 See https://hackage.haskell.org/package/dhall-nix/docs/Dhall-Nix.html for
16 Note that this uses "import from derivation", meaning that Nix will perform
17 a build during the evaluation phase if you use this `dhallToNix` utility
29 file = writeText "dhall-expression" code;
31 drv = stdenv.mkDerivation {
32 name = "dhall-compiled.nix";
35 dhall-to-nix <<< "${file}" > $out
38 buildInputs = [ dhall-nix ];