Open deemp opened 1 year ago
@deemp Thanks for the nice reproducible example!
cc @maralorn
Interesting. I believe this is a general property of our builder, one would have to look into that to figure out if and how it could be avoided.
The recommended way to circumvent this problem is to install hls via the packages list of ghc with packages set. The toplevel hls package only has a very narrow use case.
@maralorn, what do you mean by via the packages list of ghc with packages set
?
As you can see, here, I used pkgs.haskell.packages.ghc902
and got that strange behavior.
@deemp I mean hpkgs.ghcWithPackages (ps: [ ps.acme-missiles ps.haskell-language-server])
.
That way you get hls exactly matching your ghc.
Describe the bug
HLS brings its own GHC into a devshell. If I write HLS before custom ghc with packages in
buildInputs
, I'll get a GHC from HLS.Steps To Reproduce
Here's a flake with a demo
https://github.com/deemp/gists/blob/d6ec5c859dc6c3e979282fdc1b2bf595c671c239/hlsBringsGHC/flake.nix
Expected behavior
HLS doesn't bring its GHC into a devshell.
Notify maintainers
@cdepillabout
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result."x86_64-linux"
Linux 5.19.0-38-generic, Ubuntu, 22.04.2 LTS (Jammy Jellyfish), nobuild
no
yes
nix-env (Nix) 2.13.3
"nixpkgs"
/home/eyjafjallajokull/.nix-defexpr/channels/nixpkgs