-
-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
haskell: cabal unable to find alex and happy in a shell produced with shellFor
#130556
Comments
I think this is from switching to new-style cabal builds. A temporary workaround is to always use |
Interesting! This does work ✨ 🙏 I'm curious why that would be the case though? |
I think v2 is just stricter in a lot of places. Cabal wants the executable in the package database, but right now it doesn't get there. |
I see, do you know what would be required to get the executables into the package database in the nix shell? I would be interested to maybe try and make a PR here, but I'm very unfamiliar with the nix haskell infra and how cabal works in general... |
Yeah there some some issue about this before. There isn't a good way to get it in the package database. And for thing like is just an exe it doesn't make much since. It would be nicer if there was some other way to tell cabal "trust me, I'm the right version". |
Why shouldn't an executable go into the package db? It seems as though the v2 cabal workflows expect them to be there? |
I marked this as stale due to inactivity. → More info |
Using |
See this related issue: haskell/cabal#8434 |
A more complete but still minimal reproduction is here: https://gist.github.com/ScottFreeCode/c1adb5681c5b61c61373615f63a4a7d2 I've collected GitHub issues relating to this problem here: https://gist.github.com/ScottFreeCode/ef9f254e2dd91544bba4a068852fc81f |
Describe the bug
I have
alex
andhappy
listed in thebuild-tool-depends
section of my cabal file (here), but when I enter a nix shell created withhaskellPackages.shellFor
cabal is unable to find these dependencies and gives the following error:Both
alex
andhappy
are available on path in the shell:I can work around this by running
cabal v2-update
and then cabal will download and buildalex
andhappy
by itself, but I would prefer to avoid any impurities here and have cabal pull all it's dependencies from the nix-shell.note that
haskell.nix
suffers from the same issue: input-output-hk/haskell.nix#839cc @Ericson2314 @peti @ElvishJerricco
The text was updated successfully, but these errors were encountered: