mirror of
https://github.com/haskell/haskell-language-server.git
synced 2024-09-11 08:45:35 +03:00
55 lines
1.1 KiB
Nix
55 lines
1.1 KiB
Nix
{ sources ? import nix/sources.nix,
|
|
nixpkgs ? import sources.nixpkgs {},
|
|
compiler ? "default"
|
|
}:
|
|
with nixpkgs;
|
|
|
|
let haskellPackagesForProject = if compiler == "default"
|
|
then haskellPackages.ghcWithPackages
|
|
else haskell.packages.${compiler}.ghcWithPackages;
|
|
|
|
compilerWithPackages = haskellPackagesForProject(p:
|
|
with p;
|
|
[ aeson
|
|
async
|
|
extra
|
|
gitrev
|
|
haskell-lsp
|
|
lens
|
|
network
|
|
optparse-simple
|
|
prettyprinter
|
|
QuickCheck
|
|
regex-tdfa
|
|
rope-utf16-splay
|
|
safe-exceptions
|
|
shake
|
|
tasty
|
|
tasty-golden
|
|
tasty-hunit
|
|
tasty-rerun
|
|
temporary
|
|
text
|
|
unordered-containers
|
|
]);
|
|
in
|
|
stdenv.mkDerivation {
|
|
name = "haskell-language-server";
|
|
buildInputs = [
|
|
gmp
|
|
zlib
|
|
ncurses
|
|
|
|
haskellPackages.cabal-install
|
|
haskellPackages.hlint
|
|
|
|
compilerWithPackages
|
|
|
|
];
|
|
src = null;
|
|
shellHook = ''
|
|
export LD_LIBRARY_PATH=${gmp}/lib:${zlib}/lib:${ncurses}/lib
|
|
export PATH=$PATH:$HOME/.local/bin
|
|
'';
|
|
}
|