-
Notifications
You must be signed in to change notification settings - Fork 240
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
cabal inside nix shell seems confused about build-tools such as happy #798
Comments
At a wild guess you want As for the |
I tried using |
Great, I can confirm that, by removing cabal ended up building alex/happy within the shell, but it was able to do so. I'm not sure I understand everything, but it seems that:
What I'm unclear is whether happy should have been registered in cabal in the nix shell due to its presence in the |
Seems like a bug! In particular, I think that's the same cabal config as we use in the main derivation, so it's odd that it would work there and not here. |
Warning for direnv and/or lorri users! I just wasted a shameful amount of time debugging why, for a certain project, it would build just fine on one of my machines, and fail to build on another machine. Eventually I tried It turns out that my last successful build was for a shell that had So, be careful to either |
I'm encountering a similar issue with
And because |
Ran into the same problem with plutus-starter. @purefn, did you find a fix/workaround? |
Sadly, nothing other than setting |
This seems like it may be a more general problem with Cabal and the |
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. |
Unsure if this is in fact solved? |
@michaelpj , I don't believe it is fixed. I ran into this again recently with thyme and cpphs. |
@purefn if we pass |
Not 100% certain if everyone encountering this is hitting the "nix shell + cabal v2" version of this issue, but for the sake of anyone who is: I have a straightforward reproduction without iohk's/iog's haskell.nix, here: https://gist.github.com/ScottFreeCode/c1adb5681c5b61c61373615f63a4a7d2 I've collected GitHub issues relating to this problem here: https://gist.github.com/ScottFreeCode/ef9f254e2dd91544bba4a068852fc81f |
To reproduce, you can try to use this repository (it's fairly small)
Ptival/language-ocaml@0df752c
To try and reproduce (hopefully it's not just my machine):
If it behaves like me, you will get the following message:
I've been able to have
happy
, the executable, in path, but still, when trying to build the library, cabal seems to want some target<lib>:happy:exe.happy
and does not know what it is.Also, I don't know if it's just me, but in the nix-shell, when I run
cabal update
, I get:The text was updated successfully, but these errors were encountered: