Skip to content

nix: add support for ghc 9.0.1 #1995

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

Merged
merged 17 commits into from
Jul 4, 2021
Merged

nix: add support for ghc 9.0.1 #1995

merged 17 commits into from
Jul 4, 2021

Conversation

berberman
Copy link
Collaborator

As discussed in #1871 (comment), this PR attempts to maintain a nix configuration that works for ghc 9.0.1. It's still work in progress, see the CI for results.

@anka-213
Copy link
Contributor

anka-213 commented Jul 2, 2021

It looks like it is trying to build ghc-lib-parser-8.10.5 when compiling for ghc-9. I'm guessing that is the default version in nixpkgs. Maybe overriding with something like

ghc-lib-parser = hsuper.ghc-lib-parser_9_0_1_20210324;

would work?

(Or hself instead of hsuper? I never learned when to use which.)

@maralorn
Copy link
Contributor

maralorn commented Jul 2, 2021

(Or hself instead of hsuper? I never learned when to use which.)

My rule of thumb is this: Always use hself when you can, only use hsuper to break recursion cycles.

That mostly means use foo = f hsuper.foo but bar = f hself.foo.

Reasoning is that when you do bar = f hself.foo, there could be other overrides for foo in this or a subsequent overlay and you most likely want those overrides to apply to your new bar. You wouldn‘t get them from hsuper.foo.

@berberman
Copy link
Collaborator Author

Now both nix build .#haskell-language-server-901 and nix develop .#haskell-language-server-901-dev work; I'm able to use HLS binary created by nix build to load HLS project in nix develop shell!

@berberman berberman marked this pull request as ready for review July 3, 2021 14:12
Copy link
Member

@jneira jneira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not a nix user but lgtm

@berberman berberman merged commit 8aa698b into master Jul 4, 2021
@berberman berberman deleted the nix-901 branch July 4, 2021 05:15
@berberman berberman mentioned this pull request Jul 5, 2021
35 tasks
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.

4 participants