haskell-language-server icon indicating copy to clipboard operation
haskell-language-server copied to clipboard

Fix the nix 9.4.2 devshell to build every dep with nix

Open lf- opened this issue 1 year ago • 2 comments

Currently cabal tries to build HUnit and more with cabal instead of grabbing them from nix since nix provides old versions in the current ghc942 configuration. This is largely because nix simply does not have a usable package set for ghc942 (basically the configuration-ghc9.4.2.nix file was a stub).

I'm working on that upstream here: https://github.com/NixOS/nixpkgs/pull/191618

This PR fixes that today, but points to a nixpkgs fork, which is not necessarily desirable.

lf- avatar Sep 18 '22 18:09 lf-

Thank you.

I'm curious. How does cabal works with nix in the context the nix build, because in that context, cabal takes the packages available and do not try to take other packages. But when used in the nix develop context, cabal will try to download other packages.

Said otherwise, is there a "robust" way to fix our nix develop experience so it always take the same packages as nix build, which are working.

guibou avatar Sep 19 '22 08:09 guibou

Said otherwise, is there a "robust" way to fix our nix develop experience so it always take the same packages as nix build, which are working.

Such a good question. I think what is happening is that the HLS packages are getting jailbroken (due to our hack to jailbreak and dontCheck everything) so they ignore the dependencies going into them, but crucially, jailbreak is part of the Nix build process, so it doesn't happen to the shell.

The solution would then be to Not Do That. I think my package set is unjacked enough to try removing that hack without suffering too much pain. I'll try it when I next work on this.

lf- avatar Sep 19 '22 15:09 lf-

I'm assuming this is stale, please reopen if not!

michaelpj avatar Jun 14 '23 11:06 michaelpj