-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
cabal-install: wrap to put binutils and ghc into scope #85136
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
Conversation
The issue referenced in this pull request affects me as well, and I can confirm that this pull request fixes the issue. Also it looks to be exactly the proper way to fix it. Thank you for your work, @xaverdh! While we are at it, we could think about adding a further runtime dependency: namely ghc itself. If ghc is not in the path, cabal immediately aborts with a message like:
found. Of course not many people use cabal without having ghc in scope. But some might: People who don't know much about Haskell but still want to try some Haskell program and are following some README instructions telling them to "just run |
Agreed that |
f0dfc37
to
1549d29
Compare
Done. |
Hmm, as far as I know, we haven't done this in the past because That is to say, you can create an environment with multiple GHCs available and tell As far as I know, you can also use the same Although I do agree that wrapping cc @peti on this one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That change causes trouble for people with non-trivial setups, especially those who use Nix on a non-NixOS host system.
@xaverdh Okay, so it sounds like we'll be willing to merge this in as long as you remove the reference to I think it makes sense to reference binutils to get |
I think it makes sense to reference binutils to get ar.
Does cabal-install need 'ar'?
|
1549d29
to
6594554
Compare
Yes indeed, see the original issue (#55995). |
@GrahamcOfBorg build cabal-install |
So what happens if I install I don't know ... I'm not convinced that wrapping |
@peti so you are saying that using the same cabal version with multiple I guess instead of prefixing we could also suffix the |
@xaverdh It sounds like peti has a use-case for As far as I know, we don't have any firm guidelines in nixpkgs as to whether build-tools that don't require reference to a compiler should or should not include a reference to the compiler. I think peti has a good point that you can install However, I'm not sure what other build-tools that can work with multiple compiler versions do in this case. If you wanted to create an issue (or a post on discourse) and ask for input from other members of the nix community, it would be helpful in deciding what to do here. Also, it would be helpful to know what exactly Also, as for your suggestion, I can't recall anywhere in nixpkgs suffixing things to If we figured out why |
Perhaps relevant for this discussion: |
Ok, so here is the list of external runtime dependencies of Since there seems to be somewhat of a clash here between the NixOS use-case and the Nix on other linux use-case, maybe the right thing to do is to add a Will open a pr which does that when I find the time. |
Motivation for this change
Fixes #55995.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)