about summary refs log tree commit diff
path: root/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix')
-rw-r--r--pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix39
1 files changed, 35 insertions, 4 deletions
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 1a578dbafbdf0..c11070d21fafe 100644
--- a/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix
+++ b/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix
@@ -53,6 +53,9 @@ self: super: {
     Cabal = self.Cabal_3_8_1_0;
     Cabal-syntax = self.Cabal-syntax_3_8_1_0;
     process = self.process_1_6_16_0;
+    # Prevent dependency on doctest which causes an inconsistent dependency
+    # due to depending on ghc-8.10.7 (with bundled process) vs. process 1.6.16.0
+    vector = dontCheck super.vector;
   });
   cabal-install-solver = super.cabal-install-solver.overrideScope (self: super: {
     Cabal = self.Cabal_3_8_1_0;
@@ -60,8 +63,11 @@ 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;
+
   # Pick right versions for GHC-specific packages
-  ghc-api-compat = doDistribute self.ghc-api-compat_8_10_7;
+  ghc-api-compat = doDistribute (unmarkBroken self.ghc-api-compat_8_10_7);
 
   # ghc versions which don‘t match the ghc-lib-parser-ex version need the
   # additional dependency to compile successfully.
@@ -96,17 +102,36 @@ 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
+      (unmarkBroken hls-splice-plugin)
+      (unmarkBroken 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 =  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;
+    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);
 
   mime-string = disableOptimization super.mime-string;
 
@@ -118,6 +143,8 @@ self: super: {
     ghc-prim = self.hashable;
   };
 
+  hashable = addBuildDepend self.base-orphans super.hashable;
+
   # Doesn't build with 9.0, see https://github.com/yi-editor/yi/issues/1125
   yi-core = doDistribute (markUnbroken super.yi-core);
 
@@ -145,4 +172,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;
 }