-
Notifications
You must be signed in to change notification settings - Fork 163
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
Can’t install specific version of haskell-language-server with reflex-platform #747
Comments
IIRC the nixpkgs pinned down here had HLS in a different place than more recent nixpkgs.
I think you want to add reflex-platform/project/default.nix Lines 89 to 92 in 53ef944
Haven't tried shellToolOverrides = self: super: {
inherit (pkgs.haskell.packages.ghc865) haskell-language-server;
};
The above method gives you the pinned nixpkgs's HLS which is 0.4.0.0. @fendor had a shot at using newer ones but I think it turned out to be complicated. |
Hmm, in that case do you know where it is?
I must have looked through that file about five times for a field like that, and still I managed to miss it — thanks for pointing this out!
In that case, I think I’ll leave this issue open. After all HLS is one of the most widely-used packages for Haskell development, and I think most people (including me) would prefer to use a newer version. |
Using this approach with nixpkgs 20.09:
I get an error: Unexpected usage error |
If anyone else comes across this thread, I was able to get a These are the steps in the link:
I think reflex-platform should provide an option to install hls. Nix could probably automate the cabal install manual step right? |
I have a project using reflex-platform with GHC 8.6.5. Therefore, this project requires haskell-language-server built with GHC 8.6.5. The haskell4nix documentation is very clear on how to install a specific version of HLS, and after looking around the reflex-platform source a bit, I managed to produce the following Nix expression:
Of course, I soon discovered that this doesn’t work: supplying
config
to./reflex-platform
only affects the expression resulting from the import, so installing HLS usingnix-env -i haskell-language-server
(insidenix-shell
) still gets the wrong version, because it’s still looking in<nixpkgs>
.I then did some debugging with
nix repl
, and this produced the curious result thatnixpkgs
inside./reflex-platform
does not even appear to containhaskell-language-server
:By contrast, it contained other packages I’d expect, for instance GCC:
And the global
nixpkgs
certainly contained HLS as expected:Furthermore, even if
(import ./reflex-platform { inherit system config; }).nixpkgs
were to contain HLS as expected, I’m not sure how I would even go about installing it within my Nix shell, given that said version ofnixpkgs
is accessible only within the function call indefault.nix
.Thus I enquire: does there exist any way to install a specific version of HLS using reflex-platform? And if there is, could it please be added to the documentation? (I know it’s a beginner topic, but then again, HLS is likely one of the first things a beginner would want to install.)
The text was updated successfully, but these errors were encountered: