haskell.packages.ghc810.haskell-language-server: Fix build

This commit is contained in:
maralorn 2022-12-17 02:06:57 +01:00
parent b9b319d348
commit ad0d7cf936

View file

@ -99,17 +99,31 @@ self: super: {
executableHaskellDepends = drv.executableToolDepends or [] ++ [ self.repline ];
}) super.hnix);
haskell-language-server = addBuildDepend self.hls-brittany-plugin (super.haskell-language-server.overrideScope (lself: lsuper: {
haskell-language-server = let
# These aren't included in hackage-packages.nix because hackage2nix is configured for GHC 9.2, under which these plugins aren't supported.
# See https://github.com/NixOS/nixpkgs/pull/205902 for why we use `self.<package>.scope`
additionalDeps = with self.haskell-language-server.scope; [ hls-brittany-plugin hls-haddock-comments-plugin hls-splice-plugin hls-tactics-plugin ];
in addBuildDepends additionalDeps (super.haskell-language-server.overrideScope (lself: lsuper: {
Cabal = lself.Cabal_3_6_3_0;
aeson = lself.aeson_1_5_6_0;
lens-aeson = lself.lens-aeson_1_1_3;
lsp-types = doJailbreak lsuper.lsp-types; # Checks require aeson >= 2.0
}));
hls-brittany-plugin = super.hls-brittany-plugin.overrideScope (lself: lsuper: {
hls-brittany-plugin = addBuildDepends (with self.hls-brittany-plugin.scope; [
brittany czipwith extra ghc-exactprint ghcide hls-plugin-api hls-test-utils lens lsp-types
]) (super.hls-brittany-plugin.overrideScope (lself: lsuper: {
brittany = doJailbreak lself.brittany_0_13_1_2;
aeson = lself.aeson_1_5_6_0;
multistate = dontCheck lsuper.multistate;
lsp-types = doJailbreak lsuper.lsp-types; # Checks require aeson >= 2.0
});
}));
# This package is marked as unbuildable on GHC 9.2, so hackage2nix doesn't include any dependencies.
# See https://github.com/NixOS/nixpkgs/pull/205902 for why we use `self.<package>.scope`
hls-haddock-comments-plugin = addBuildDepends (with self.hls-haddock-comments-plugin.scope; [
ghc-exactprint ghcide hls-plugin-api hls-refactor-plugin lsp-types unordered-containers
]) super.hls-haddock-comments-plugin;
mime-string = disableOptimization super.mime-string;
@ -150,4 +164,8 @@ self: super: {
# Unnecessarily strict lower bound on base
# https://github.com/mrkkrp/megaparsec/pull/485#issuecomment-1250051823
megaparsec = doJailbreak super.megaparsec;
# Later versions only support GHC >= 9.2
ghc-exactprint = self.ghc-exactprint_0_6_4;
apply-refact = self.apply-refact_0_9_3_0;
}