haskell.nix/lib/override-with.nix
Rodney Lorrimar bd603e0b51
Provide hackage and stackage from haskell.nix
Providing hackage and stackage here simplifies usage of the new
Haskell Infrastructure.

With this change, the user doesn't need to specify revisions of the
external repos, or update them.

Basically, with hackage.nix and stackage.nix, the latest version is
always best, because snapshots and package versions are added on
top. So there is no need for users to choose a revision.

Also add mkStackPkgSet which is a shortcut for building stack
projects.
2019-02-13 14:51:10 +10:00

10 lines
292 B
Nix

# overrideWith - Allow the user to override the given default path
# with a NIX_PATH entry.
override: default:
let
try = builtins.tryEval (builtins.findFile builtins.nixPath override);
in if try.success then
builtins.trace "using search host <${override}>" try.value
else
default