dhallToNix: Permit inputs referring to derivations (#134459)
Fixes https://github.com/dhall-lang/dhall-haskell/issues/2267 `pkgs.dhallToNix` currently fails when a Dhall package is interpolated into the input source code, like this: ```nix let pkgs = import <nixpkgs> { }; f = { buildDhallPackage }: buildDhallPackage { name = "not"; code = "λ(x : Bool) → x == False"; source = true; }; not = pkgs.dhallPackages.callPackage f {}; in pkgs.dhallToNix "${not}/source.dhall True" ``` This is because `dhallToNix` was using `builtins.toFile`, which does not permit inputs with interpolated derivations. However, `pkgs.writeText` does not have this limitation, so we can switch to using that instead.launchpad/nixpkgs/master
parent
1c145df9ae
commit
9a8850aea9
Loading…
Reference in new issue