diff options
Diffstat (limited to 'pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix')
-rw-r--r-- | pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix | 63 |
1 files changed, 41 insertions, 22 deletions
diff --git a/pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix b/pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix index dbb550f6fd00b..0c75456735b72 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix @@ -66,6 +66,9 @@ self: super: { process = self.process_1_6_16_0; }); + # Additionally depends on OneTuple for GHC < 9.0 + base-compat-batteries = addBuildDepend self.OneTuple super.base-compat-batteries; + # Ignore overly restrictive upper version bounds. aeson-diff = doJailbreak super.aeson-diff; async = doJailbreak super.async; @@ -73,7 +76,7 @@ self: super: { chell = doJailbreak super.chell; Diff = dontCheck super.Diff; doctest = doJailbreak super.doctest; - hashable = doJailbreak super.hashable; + hashable = addBuildDepend self.base-orphans super.hashable; hashable-time = doJailbreak super.hashable-time; hledger-lib = doJailbreak super.hledger-lib; # base >=4.8 && <4.13, easytest >=0.2.1 && <0.3 integer-logarithms = doJailbreak super.integer-logarithms; @@ -123,45 +126,57 @@ self: super: { liquidhaskell = markBroken super.liquidhaskell; # This became a core library in ghc 8.10., so we don‘t have an "exception" attribute anymore. - exceptions = super.exceptions_0_10_5; - - # ghc versions which don‘t match the ghc-lib-parser-ex version need the - # additional dependency to compile successfully. - ghc-lib-parser-ex = addBuildDepend self.ghc-lib-parser super.ghc-lib-parser-ex; + exceptions = super.exceptions_0_10_7; ormolu = super.ormolu_0_2_0_0; # vector 0.12.2 indroduced doctest checks that don‘t work on older compilers vector = dontCheck super.vector; - ghc-api-compat = doDistribute super.ghc-api-compat_8_6; + ghc-api-compat = doDistribute (unmarkBroken super.ghc-api-compat_8_6); mime-string = disableOptimization super.mime-string; - haskell-language-server = addBuildDepend self.hls-brittany-plugin (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; + 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 + (unmarkBroken hls-splice-plugin) + (unmarkBroken hls-tactics-plugin) + ]; + in addBuildDepends additionalDeps (super.haskell-language-server.overrideScope (lself: lsuper: { # Pick old ormolu and fourmolu because ghc-lib-parser is not compatible ormolu = doJailbreak lself.ormolu_0_1_4_1; 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; })); - hls-hlint-plugin = super.hls-hlint-plugin.overrideScope (lself: lsuper: { - # For "ghc-lib" flag see https://github.com/haskell/haskell-language-server/issues/3185#issuecomment-1250264515 - hlint = lself.hlint_3_2_8; - 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; - }); + hlint = self.hlint_3_2_8; + + ghc-lib-parser = self.ghc-lib-parser_8_10_7_20220219; + + # ghc versions which don‘t match the ghc-lib-parser-ex version need the + # additional dependency to compile successfully. + ghc-lib-parser-ex = addBuildDepend self.ghc-lib-parser self.ghc-lib-parser-ex_8_10_0_24; - hls-brittany-plugin = super.hls-brittany-plugin.overrideScope (lself: lsuper: { + hls-brittany-plugin = unmarkBroken (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 = unmarkBroken (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 = unmarkBroken (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; @@ -189,4 +204,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; } |