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

Fix nix flake by explicit version for lsp-xxx packages #2557

Merged
merged 1 commit into from
Jan 1, 2022

Conversation

guibou
Copy link
Collaborator

@guibou guibou commented Jan 1, 2022

The nix flake was failing:

nix build .#haskell-language-server

Was failing because of bounds issue related to hackage lsp,
lsp-types and lsp-test projects.

I've bump theses version, introducing new flake input (so they can be
changed easily in the future) and now the build works.

The nix flake was failing:

```
nix build .#haskell-language-server
```

Was failing because of bounds issue related to hackage `lsp`,
`lsp-types` and `lsp-test` projects.

I've bump theses version, introducing new flake input (so they can be
changed easily in the future) and now the build works.
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.

Thanks for fixing the nix build, will wait for a review from an actual nix user to merge

};
outputs =
{ self, nixpkgs, flake-compat, flake-utils, pre-commit-hooks, gitignore }:
{ self, nixpkgs, flake-compat, flake-utils, pre-commit-hooks, gitignore, lsp-source, lsp-types-source, lsp-test-source }:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Cute. In the past we've just used an explicit fetchurl for this sort of thing, but this is nicer, I think. That said, it might be simpler to update if the flake input pointed to the corresponding tag in the github repository instead of hackage?

Copy link
Collaborator

Choose a reason for hiding this comment

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

No obligation, I'll merge this in a day or so regardless.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Initially I tried to load it from github directly.. However I had problem finding the tags in the git repository. For example, there is no 1.4.0.0 tag (or any other variation, unless I'm wrong) in the https://github.com/haskell/lsp repository.

Then I realized that the source of truth is hackage. The cabal file for Haskell language server is actually using bounds based on hackage version and hence fetching the revision as it is on hackage seems more robust from my point of view.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The tags are confusing indeed, they're prefixed by the package. And it's no wonder you weren't able to find them... I forgot to push the tags (done now) 😅 anyway, not a big deal.

@michaelpj michaelpj merged commit ee0a0cc into haskell:master Jan 1, 2022
@guibou guibou deleted the fix_flake branch January 1, 2022 19:23
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.

None yet

3 participants