about summary refs log tree commit diff
path: root/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix
diff options
context:
space:
mode:
authorNaïm Favier <n@monade.li>2022-12-13 01:02:01 +0100
committerNaïm Favier <n@monade.li>2022-12-13 12:23:03 +0100
commit264178657fd05dfdfc53fac0a3b58e9b27279588 (patch)
tree63311438f481849877aebac77098b4ca643cf479 /pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix
parent8605595bca74b15ee1dc7f264bd6ddc009e451de (diff)
downloadnixlib-264178657fd05dfdfc53fac0a3b58e9b27279588.tar
nixlib-264178657fd05dfdfc53fac0a3b58e9b27279588.tar.gz
nixlib-264178657fd05dfdfc53fac0a3b58e9b27279588.tar.bz2
nixlib-264178657fd05dfdfc53fac0a3b58e9b27279588.tar.lz
nixlib-264178657fd05dfdfc53fac0a3b58e9b27279588.tar.xz
nixlib-264178657fd05dfdfc53fac0a3b58e9b27279588.tar.zst
nixlib-264178657fd05dfdfc53fac0a3b58e9b27279588.zip
haskell.packages.ghc902.haskell-language-server: fix
Diffstat (limited to 'pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix')
-rw-r--r--pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix17
1 files changed, 15 insertions, 2 deletions
diff --git a/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix b/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix
index 2a66c3aafcd2..216648851c95 100644
--- a/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix
+++ b/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix
@@ -92,6 +92,7 @@ self: super: {
   split = doJailbreak super.split;
   tar = doJailbreak super.tar;
   time-compat = doJailbreak super.time-compat;
+  tuple = addBuildDepend self.base-orphans super.tuple;
   vector = doJailbreak (dontCheck super.vector);
   vector-binary-instances = doJailbreak super.vector-binary-instances;
   vector-th-unbox = doJailbreak super.vector-th-unbox;
@@ -106,11 +107,19 @@ self: super: {
     sha256 = "0rgzrq0513nlc1vw7nw4km4bcwn4ivxcgi33jly4a7n3c1r32v1f";
   }) (doJailbreak super.language-haskell-extract);
 
-  haskell-language-server = 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.
+    additionalDeps = with super.haskell-language-server.scope; [ hls-haddock-comments-plugin hls-splice-plugin hls-tactics-plugin ];
+  in addBuildDepends additionalDeps (super.haskell-language-server.overrideScope (lself: lsuper: {
     # Needed for modern ormolu and fourmolu.
     # Apply this here and not in common, because other ghc versions offer different Cabal versions.
     Cabal = lself.Cabal_3_6_3_0;
-  });
+  }));
+
+  # This package is marked as unbuildable on GHC 9.2, so hackage2nix doesn't include any dependencies.
+  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;
 
   # The test suite depends on ChasingBottoms, which is broken with ghc-9.0.x.
   unordered-containers = dontCheck super.unordered-containers;
@@ -157,4 +166,8 @@ self: super: {
 
   # Restrictive upper bound on base and containers
   sv2v = doJailbreak super.sv2v;
+
+  # Later versions only support GHC >= 9.2
+  ghc-exactprint = self.ghc-exactprint_0_6_4;
+  apply-refact = self.apply-refact_0_9_3_0;
 }