haskell.nix icon indicating copy to clipboard operation
haskell.nix copied to clipboard

Do not call hpack if .cabal exists

Open kirelagin opened this issue 4 years ago • 2 comments

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;
}

kirelagin avatar May 24 '20 09:05 kirelagin

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.

stale[bot] avatar Sep 28 '22 22:09 stale[bot]

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.

hamishmack avatar Oct 04 '22 23:10 hamishmack