haskell.nix
haskell.nix copied to clipboard
Do not call hpack if .cabal exists
I have a package where both package.yaml
and .cabal
are committed into the repository (as recommended nowadays). When I try to build it with haskell.nix
, I get:
<pkgname>.cabal was generated with a newer version of hpack, please upgrade and try again.
From a quick look, it seems that there is some code that is meant to call hpack
only if there is no .cabal
file around, but, I guess, it does something else.
I have worked it around for now by doing:
{
pkgname.cabal-generator = pkgs.lib.mkForce null;
}
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.
This has been fixed for cabalProject
https://github.com/input-output-hk/haskell.nix/blob/9b73e5d8fbb7a79196b84d5db894547d977e8cab/lib/call-cabal-project-to-nix.nix#L527
I think someone needs to check if it has been fixed for stackProject
.