diff --git a/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix b/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix index c087c7cff523..6e5ea296b001 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix @@ -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..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..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; }