haskellPackages.haskell-language-server: Add aliases with ghc version
Needed by haskell-language-server-wrapper to discover the correct binary. Especially useful when installing hls from multiple ghc version.
This commit is contained in:
parent
6bcfecbfa2
commit
13f22aec25
@ -782,4 +782,14 @@ self: super: builtins.intersectAttrs super {
|
||||
testToolDepends = [ pkgs.git pkgs.mercurial ];
|
||||
});
|
||||
|
||||
haskell-language-server = overrideCabal super.haskell-language-server (drv: {
|
||||
postInstall = let
|
||||
inherit (pkgs.lib) concatStringsSep take splitString;
|
||||
ghc_version = self.ghc.version;
|
||||
ghc_major_version = concatStringsSep "." (take 2 (splitString "." ghc_version));
|
||||
in ''
|
||||
ln -s $out/bin/haskell-language-server $out/bin/haskell-language-server-${ghc_version}
|
||||
ln -s $out/bin/haskell-language-server $out/bin/haskell-language-server-${ghc_major_version}
|
||||
'';
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user