-
Notifications
You must be signed in to change notification settings - Fork 237
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
First attempt at getting haskell.nix to work with nixpkgs provided compiler #1833
Conversation
Ok, ghc is missing the |
d646786
to
9085614
Compare
Question: what do we do if the compiler does not exist in the nixpkgs used with Haskell.nix? As they are orthogonal, I don't think there is any guarantee about the GHC we can expect form nixpkgs? Edit: to be clear, I'm not against this. I just want to know how we expect to deal with this in a way that the user can make some sense of. |
If not, it will probably fail with an error. |
Well the short answer is simply
but from an API pov your raise a good point because by referencing the compiler version by its name, haskell.nix has always replaced the compiler in nixpkgs. Perhaps we could (in some future) migrate to passing a |
There's actually a reason why we do this... cross-compilation 🙈 We want to be able to select both the cross and normal version of the compiler, and the way we do this at the moment is by using the name as the key to look up both. An example of where this matters is when you have a cross-built project but you want to get a dev shell... then you need to use the non-cross compiler. See #610 for when it was introduced.
A slightly more indirect way of supporting what you want here would be to provide a way to override haskell.nix's |
Thanks for the explanation @michaelpj! |
I'm closing this in favour of #1854 as I am borrowing the ideas here to use there. |
Addresses #1565, #1531
Test with
You can compare with haskell.nix provided ghc doing
It doesn't work yet.