From 2c526a5d52a941722c59465a07befddbb3b300a3 Mon Sep 17 00:00:00 2001 From: maralorn Date: Mon, 2 Jun 2025 14:30:37 +0200 Subject: [PATCH] haskell-language-server: Fix build (on ghc 9.12) --- .../configuration-ghc-9.12.x.nix | 24 ++++++------------- .../haskell-modules/configuration-nix.nix | 1 + 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-ghc-9.12.x.nix b/pkgs/development/haskell-modules/configuration-ghc-9.12.x.nix index c2d4fe427da7..7303fec91cec 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.12.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.12.x.nix @@ -85,8 +85,10 @@ with haskellLib; ghc-lib-parser = doDistribute self.ghc-lib-parser_9_12_2_20250421; ghc-lib-parser-ex = doDistribute self.ghc-lib-parser-ex_9_12_0_0; hlint = doDistribute self.hlint_3_10; - fourmolu = doDistribute self.fourmolu_0_18_0_0; + # fourmolu checks require Diff > 1.0, which is not yet supported by various other deps of hls. + fourmolu = doDistribute (dontCheck self.fourmolu_0_18_0_0); ormolu = doDistribute self.ormolu_0_8_0_0; + stylish-haskell = doDistribute self.stylish-haskell_0_15_1_0; apply-refact = doDistribute self.apply-refact_0_15_0_0; # @@ -167,13 +169,6 @@ with haskellLib; # Multiple issues # - fourmolu_0_18_0_0 = dontCheck ( - super.fourmolu_0_18_0_0.override { - # Diff >=1 && <2 - Diff = super.Diff_1_0_2; - } - ); - doctest-parallel = overrideCabal (drv: { patches = drv.patches or [ ] ++ [ (pkgs.fetchpatch { @@ -185,15 +180,10 @@ with haskellLib; ]; }) (dontCheck (doJailbreak super.doctest-parallel)); # Cabal >=2.4 && <3.13 - haskell-language-server = disableCabalFlag "retrie" ( - disableCabalFlag "stylishhaskel" ( - super.haskell-language-server.override { - stylish-haskell = null; - floskell = null; - retrie = null; - } - ) - ); + haskell-language-server = super.haskell-language-server.override { + floskell = null; + retrie = null; + }; # Allow Cabal 3.14 hpack = doDistribute self.hpack_0_38_0; diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index 03dc6bf22533..6c965fab1bc5 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -1433,6 +1433,7 @@ builtins.intersectAttrs super { fourmolu fourmolu_0_14_0_0 fourmolu_0_16_0_0 + fourmolu_0_18_0_0 ; # Test suite needs to execute 'disco' binary