haskell-language-server
haskell-language-server copied to clipboard
Fix the nix 9.4.2 devshell to build every dep with nix
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.
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.
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.
I'm assuming this is stale, please reopen if not!