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

This commit is contained in:
maralorn 2022-12-17 01:56:27 +01:00
parent 4fc62a4bbe
commit 093d158f5b

View file

@ -141,7 +141,11 @@ self: super: {
mime-string = disableOptimization super.mime-string;
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: {
ghc-lib-parser = lself.ghc-lib-parser_8_10_7_20220219;
ghc-lib-parser-ex = addBuildDepend lself.ghc-lib-parser lself.ghc-lib-parser-ex_8_10_0_24;
# Pick old ormolu and fourmolu because ghc-lib-parser is not compatible
@ -149,7 +153,8 @@ self: super: {
fourmolu = doJailbreak lself.fourmolu_0_3_0_0;
hlint = lself.hlint_3_2_8;
aeson = lself.aeson_1_5_6_0;
stylish-haskell = lself.stylish-haskell_0_13_0_0;
lens-aeson = lself.lens-aeson_1_1_3;
stylish-haskell = doJailbreak lself.stylish-haskell_0_13_0_0;
lsp-types = doJailbreak lsuper.lsp-types;
}));
@ -160,11 +165,20 @@ self: super: {
ghc-lib-parser-ex = addBuildDepend lself.ghc-lib-parser lself.ghc-lib-parser-ex_8_10_0_24;
});
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;
lsp-types = doJailbreak lsuper.lsp-types;
});
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;
# has a restrictive lower bound on Cabal
fourmolu = doJailbreak super.fourmolu;
@ -192,4 +206,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;
}