about summary refs log tree commit diff
path: root/pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix
diff options
context:
space:
mode:
authormaralorn <mail@maralorn.de>2022-12-17 01:56:27 +0100
committermaralorn <mail@maralorn.de>2022-12-17 01:56:27 +0100
commit093d158f5b96338bc876ecda874fcebc3306e800 (patch)
treee4f3b46dd320e3811518d2c87d6b3290c4082ec2 /pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix
parent4fc62a4bbef9ff3c55fa72314adc3fd4fa18e5ad (diff)
downloadnixlib-093d158f5b96338bc876ecda874fcebc3306e800.tar
nixlib-093d158f5b96338bc876ecda874fcebc3306e800.tar.gz
nixlib-093d158f5b96338bc876ecda874fcebc3306e800.tar.bz2
nixlib-093d158f5b96338bc876ecda874fcebc3306e800.tar.lz
nixlib-093d158f5b96338bc876ecda874fcebc3306e800.tar.xz
nixlib-093d158f5b96338bc876ecda874fcebc3306e800.tar.zst
nixlib-093d158f5b96338bc876ecda874fcebc3306e800.zip
haskell.packages.ghc88.haskell-language-server: Fix build
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.nix30
1 files changed, 24 insertions, 6 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 b3b5e4db7e53..aa27bdd7d6f2 100644
--- a/pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix
+++ b/pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix
@@ -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;
 }