No such package in Cabal database while converting a stack project
AlexeyRaga opened this issue · 1 comments
AlexeyRaga commented
Here is a part of my stack.yaml
:
extra-deps:
- avro-0.3.0.4
Running stackage2nix --with-stackage ./stack.yaml
gives me this error:
stackage2nix: user error (No such package avro-0.3.0.4 in the cabal database. Did you run cabal update?)
The package is not on stackage
, but it is definitely on hackage
.
Looks like the error is not specific to avro
, other extra-deps packages cause the same error.
I don't see how cabal update
is relevant to a Stack project, but I have tried this:
$ stack exec bash
bash-3.2$ cabal update
bash-3.2$ stackage2nix --with-stackage ./stack.yaml
But it didn't help
4e6 commented
You are probably using stackage2nix
wrapper which has it's own Cabal database prefetched and cached by nix. The problem with the wrapper is that we cannot fetch Cabal database in a deterministic way, see #41.
I've just updated the https://github.com/typeable/nixpkgs-stackage repository, so reinstalling (updating) stackage2nix should help