Skip to content
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

Nix: Select the correct GHC version in more cases. #1642

Closed
wants to merge 1 commit into from

Conversation

mboes
Copy link
Contributor

@mboes mboes commented Jan 11, 2016

Even when abstract resolver is provided.

Fixes #1641.

@mboes mboes force-pushed the nix-abstract-resolver branch 2 times, most recently from 12e9bc1 to 4bdd49d Compare January 11, 2016 18:39
Even when abstract resolver is provided.

Fixes #1641.
@mboes mboes force-pushed the nix-abstract-resolver branch from 4bdd49d to 1298300 Compare January 11, 2016 20:51
@mboes
Copy link
Contributor Author

mboes commented Jan 11, 2016

Basic approach not workable. Will resubmit once I get some time to think about this a bit more.

@borsboom
Copy link
Contributor

What turned out to be unworkable about the approach? This is relevant for Docker as well.

@mboes mboes deleted the nix-abstract-resolver branch January 12, 2016 13:59
@mboes
Copy link
Contributor Author

mboes commented Jan 12, 2016

What didn't work is that I completely forgot to take into the stack.yaml resolver. The needed info is available in the Project datatype passed to nixOptsFromMonoid and dockerOptsFromMonoid, but not in reexecWithOptionalShell.

So what we need is this: create a closure in nixOptsFromMonoid that chooses a compiler package name based on the Project info by default. Store the closure as a field in NixOpts. Then, if in reality the user passed in an abstract resolver on the command-line, then concretize it in reexecWithOptionalShell and invoke the closure to get a final compiler package name. That's exactly what I did in #1646, which is a slight rewrite of this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

stack --nix --resolver doesn't work as expected
2 participants