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
Error in v1 Nix support: --add-root flag not supported by nix-shell #9146
Comments
This was found in the process of testing https://gist.github.com/ScottFreeCode/9b0ea3e52fa56c93ea8ca14791e55bb4 for whatever that's worth. That gist in turn is relevant to various issues relating to BNFC/Alex/Happy, Cabal+Nix integration, Cabal v2 build, etc. I'm going to be sharing it around to them in the near future, I kinda had a list running but… well, I never put the list all in one place so I'll have to dig them up. |
I'd be grateful if you could bump those issues if/when you find them. You are welcome to ping me as well. |
The TL;DR on the Cabal v2 problem is that it doesn't find executables provided by nix-shell.* Found the issue I opened for it at NixOS/nixpkgs#176887 – that thread also links a lot of GitHub issues, some of which link or are linked to by still more ones, revolving around this problem or related ones about the underlying causes/limitations. The issue reports are scattered across Nixpkgs, IOHK's/IOG's haskell.nix, and Cabal. I can ping all of them if appropriate, or all the Cabal ones that seem to be directly and not merely tangentially related. Note that unlike the v1- issue, which depends only on using Cabal's *Or provided by Nix using IOHK's haskell.nix, which I think may be a much more complex wrapper around the same nixpkgs callCabal2Nix that my gists are using directly. Most of the issues where this comes up, concern iohk's haskell.nix; but just using the base |
Describe the bug
nix-shell must have removed the
--add-root
flag at some point. Cabal v1 would have to be updated accordingly or nix integration turned off.The error from Nix is:
To Reproduce
Steps to reproduce the behavior:
Or even without
--enable-nix
ifnix: True
is in~/.cabal/config
Expected behavior
Cabal v1 + Nix intergation continues to work (any Cabal command: build, etc.).
System information
Additional context
I've tried to find out when --add-root was removed but nothing that specific turns up in a web or documentation search.
I don't see
add-root
in the man page fromnix-shell --help
for example, despite the suggestion from the error message.(Also, I do know v2 is preferred. I'm using v1 with Nix as a workaround for an issue with v2 finding binaries like BNFC, may also affect Alex & Happy. There are already tickets/issues open for that one; if it would help, I can link them here when I track them down.)
The text was updated successfully, but these errors were encountered: