mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
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
1 changed files with 10 additions and 0 deletions
|
@ -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 a new issue