haskell.nix
haskell.nix copied to clipboard
Allow caller to specify hpack version
trafficstars
It would be nice if you the caller could specify the version of hpack used for a project. This would avoid the wrong version being used and make it easier for the correct one to be materialized or pinned.
The new args for stackProject and cabalProject would be something like:
{ ...
, hpack ? null
, hpackTool ? if hpack == null then nulll else evalPackages.haskell-nix.tool compiler-nix-name "hpack" hpack
}:
let
...
nativeBuildInputs = [ nix-tools hpackTool ]; # For anything planning to run `hpack`
...
in {
roots = { inherit hpackTool; ... };
}
Then we could remove the hpack exe from nix-tools and the calling code would need something like:
let
project = haskell-nix.cabalProject {
hpack = "latest";
}
we could add materialization with something like:
let
project = haskell-nix.cabalProject {
hpack = { version = "1.2.3.4"; matialized = ./materialized/hpack; };
}
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.