From 65d6fc555b310ea392b249a7f168f828593d7088 Mon Sep 17 00:00:00 2001 From: maralorn Date: Sat, 24 Dec 2022 17:46:42 +0100 Subject: [PATCH] haskell-language-server: Enable reenable dependencies for older ghcs --- .../configuration-ghc-8.10.x.nix | 17 +++++++++++------ .../configuration-ghc-8.8.x.nix | 18 +++++++++++------- .../configuration-ghc-9.0.x.nix | 12 +++++++++--- 3 files changed, 31 insertions(+), 16 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 1ff5e23b4431..470c79b643d9 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix @@ -105,7 +105,12 @@ self: super: { 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 ]; + 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; @@ -113,20 +118,20 @@ self: super: { lsp-types = doJailbreak lsuper.lsp-types; # Checks require aeson >= 2.0 })); - hls-brittany-plugin = addBuildDepends (with self.hls-brittany-plugin.scope; [ + 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 = dontCheck lsuper.multistate; + 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..scope` - hls-haddock-comments-plugin = addBuildDepends (with self.hls-haddock-comments-plugin.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; + ]) super.hls-haddock-comments-plugin); mime-string = disableOptimization super.mime-string; 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 fc05da903bd9..90df495523fa 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix @@ -140,7 +140,12 @@ self: super: { 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 ]; + 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; @@ -159,20 +164,19 @@ self: super: { # 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 = addBuildDepends (with self.hls-brittany-plugin.scope; [ + 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; - multistate = dontCheck lsuper.multistate; + 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..scope` - hls-haddock-comments-plugin = addBuildDepends (with self.hls-haddock-comments-plugin.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; - + ]) super.hls-haddock-comments-plugin); # has a restrictive lower bound on Cabal fourmolu = doJailbreak super.fourmolu; 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 279acbeca15c..350bc4ddfe6a 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix @@ -110,7 +110,11 @@ self: super: { 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-haddock-comments-plugin hls-splice-plugin hls-tactics-plugin ]; + additionalDeps = with self.haskell-language-server.scope; [ + hls-haddock-comments-plugin + (unmarkBroken hls-splice-plugin) + (unmarkBroken 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. @@ -119,9 +123,9 @@ self: super: { # 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; [ + 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; + ]) 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; @@ -142,6 +146,8 @@ self: super: { # https://github.com/Soostone/retry/issues/71 retry = dontCheck super.retry; + ghc-api-compat = unmarkBroken super.ghc-api-compat; + # 2021-09-18: cabal2nix does not detect the need for ghc-api-compat. hiedb = overrideCabal (old: { libraryHaskellDepends = old.libraryHaskellDepends ++ [self.ghc-api-compat];