mirror of
https://github.com/haskell/haskell-language-server.git
synced 2024-10-26 09:20:16 +03:00
88a1dbbbfb
- Bumped nixpkgs, so that's a true GHC 9.4.2 and not 9.4.0, which was failing in cabal which because it was detecting <=9.4.1. - Fixed GHC 9.4 overrides for dependencies - Use the "default" GHC environment for tooling in the shell. Hence it rebuilds less. - I introduced a flake for cabal-hashes, hence it can be updated automatically (with `nix flake update`) and hence we can use `callHackage` for any hackage package.
56 lines
2.1 KiB
Nix
56 lines
2.1 KiB
Nix
{ pkgs, inputs }:
|
|
|
|
let
|
|
disabledPlugins = [
|
|
"hls-hlint-plugin"
|
|
# That one is not technically a plugin, but by putting it in this list, we
|
|
# get it removed from the top level list of requirement and it is not pull
|
|
# in the nix shell.
|
|
"shake-bench"
|
|
];
|
|
|
|
hpkgsOverride = hself: hsuper:
|
|
with pkgs.haskell.lib;
|
|
{
|
|
hlsDisabledPlugins = disabledPlugins;
|
|
# YOLO
|
|
mkDerivation = args:
|
|
hsuper.mkDerivation (args // {
|
|
jailbreak = true;
|
|
doCheck = false;
|
|
});
|
|
} // (builtins.mapAttrs (_: drv: disableLibraryProfiling drv) {
|
|
# ptr-poker breaks on MacOS without SSE2 optimizations
|
|
# https://github.com/nikita-volkov/ptr-poker/issues/11
|
|
ptr-poker = hself.callCabal2nix "ptr-poker" inputs.ptr-poker { };
|
|
|
|
ghc-exactprint =
|
|
hself.callCabal2nix "ghc-exactprint" inputs.ghc-exactprint-150 { };
|
|
# Hlint is still broken
|
|
hlint = doJailbreak (hself.callCabal2nix "hlint" inputs.hlint { });
|
|
|
|
stylish-haskell = appendConfigureFlag hsuper.stylish-haskell "-fghc-lib";
|
|
|
|
cereal = hsuper.callHackage "cereal" "0.5.8.3" {};
|
|
base-compat = hsuper.callHackage "base-compat" "0.12.2" {};
|
|
base-compat-batteries = hsuper.callHackage "base-compat-batteries" "0.12.2" {};
|
|
hashable = hsuper.callHackage "hashable" "1.4.1.0" {};
|
|
primitive = hsuper.callHackage "primitive" "0.7.4.0" {};
|
|
ghc-check = hsuper.callHackage "ghc-check" "0.5.0.8" {};
|
|
lens = hsuper.callHackage "lens" "5.2" {};
|
|
integer-logarithms = hsuper.callHackage "integer-logarithms" "1.0.3.1" {};
|
|
hiedb = hsuper.callHackage "hiedb" "0.4.2.0" {};
|
|
hie-bios = hsuper.callHackage "hie-bios" "0.11.0" {};
|
|
lsp = hsuper.callCabal2nix "lsp" "${inputs.lsp}/lsp" {};
|
|
lsp-types = hsuper.callCabal2nix "lsp-types" "${inputs.lsp}/lsp-types" {};
|
|
|
|
# Re-generate HLS drv excluding some plugins
|
|
haskell-language-server =
|
|
hself.callCabal2nixWithOptions "haskell-language-server" ./.
|
|
(pkgs.lib.concatStringsSep " " [ "-fpedantic" "-f-hlint" ]) { };
|
|
});
|
|
in {
|
|
inherit disabledPlugins;
|
|
tweakHpkgs = hpkgs: hpkgs.extend hpkgsOverride;
|
|
}
|