Skip to content

attempt to fix Nix build #2136

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

Closed
wants to merge 2 commits into from
Closed

Conversation

peterbecich
Copy link
Member

@peterbecich peterbecich commented Aug 29, 2021

nix-build succeeds on this branch

SHA acquired with nix-prefetch-url https://hackage.haskell.org/package/lsp-types-1.3.0.1/lsp-types-1.3.0.1.tar.gz --unpack

@pepeiborra
Copy link
Collaborator

pepeiborra commented Aug 29, 2021

The Nix CI job is failing in a confusing way - it's trying to build the development shell with multiple versions of GHC in the same job, and failing for 9.0.1. This should probably be done using a matrix instead. @berberman do you remember if this was a deliberate choice?

The failure is not related to this PR, but it's preventing us from finding out whether the PR works or not

@berberman
Copy link
Collaborator

Sorry for being inactive these days, I was pretty busy.

What Nix / build jobs do is push the development shell and "nightly" HLS binary to cachix, and they are likely to be broken due to packages updates e.g. bumping the version of lsp. The support of GHC 9.0.1 was introduced in #1995, which is very ad-hoc, and a matrix CI for Nix / build jobs would be a better choice.

Now I don't have nix environment around, but I guess to fix the jobs, at least we shoud:

  • bump nixpkgs
  • change
    lsp = hself.callCabal2nix "lsp"
    (builtins.fetchTarball {
    url = "https://hackage.haskell.org/package/lsp-1.2.0.1/lsp-1.2.0.1.tar.gz";
    sha256 = "1lhzsraiw11ldxvxn8ax11hswpyzsvw2da2qmp3p6fc9rfpz4pj5";
    }) { };
    lsp-types = hself.callCabal2nix "lsp-types"
    (builtins.fetchTarball {
    url = "https://hackage.haskell.org/package/lsp-types-1.3.0.0/lsp-types-1.3.0.0.tar.gz";
    sha256 = "0qajyyj2d51daa4y0pqaa87n4nny0i920ivvzfnrk9gq9386iac7";
    }) { };
    lsp-test = hself.callCabal2nix "lsp-test"
    (builtins.fetchTarball {
    url = "https://hackage.haskell.org/package/lsp-test-0.14.0.1/lsp-test-0.14.0.1.tar.gz";
    sha256 = "10lnyg7nlbd3ymgvjjlrkfndyy7ay9cwnsk684p08k2gzlric4yq";
    }) { };

to something like

              lsp = hself.lsp_1_2_0_1;

              lsp-types = hself.lsp-types_1_3_0_1;

              lsp-test = hself.lsp-test_0_14_0_1;

because these packages we override the sources of are already in nixpkgs

because we need ormolu 0.2.0.0 in GHC 9.0.1 (#2086)

@jneira
Copy link
Member

jneira commented Sep 3, 2021

@peterbecich hi! thanks for trying to fix the nix build, have you got the chance to check the suggestion above?

@jneira jneira added the status: needs info Not actionable, because there's missing information label Sep 3, 2021
@lf-
Copy link
Contributor

lf- commented Sep 4, 2021

So I was poking at doing basically the same thing as this PR requests without noticing it already existed and did all the requested things from here. See #2159.

@peterbecich
Copy link
Member Author

Thank you @pepeiborra , @berberman , @jneira and @lf- ; sorry for my late response. Closing in favor of #2159
I have not tried the suggestion above, yet. I will do that now so that I can learn something.

@peterbecich peterbecich closed this Sep 4, 2021
@peterbecich peterbecich deleted the fix-nix-build branch September 4, 2021 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs info Not actionable, because there's missing information
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants