diff options
Diffstat (limited to 'pkgs/development/haskell-modules/configuration-ghc-9.4.x.nix')
-rw-r--r-- | pkgs/development/haskell-modules/configuration-ghc-9.4.x.nix | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/pkgs/development/haskell-modules/configuration-ghc-9.4.x.nix b/pkgs/development/haskell-modules/configuration-ghc-9.4.x.nix index 7b9feb98dcb..d13e4cfe9cf 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.4.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.4.x.nix @@ -111,7 +111,32 @@ in { # https://github.com/kowainik/relude/issues/436 relude = dontCheck super.relude; - fourmolu = overrideCabal (drv: { - libraryHaskellDepends = drv.libraryHaskellDepends ++ [ self.file-embed ]; - }) (disableCabalFlag "fixity-th" super.fourmolu); + inherit + ( + let + hls_overlay = lself: lsuper: { + ghc-lib-parser = lself.ghc-lib-parser_9_6_3_20231014; + ghc-lib-parser-ex = doDistribute lself.ghc-lib-parser-ex_9_6_0_2; + Cabal-syntax = lself.Cabal-syntax_3_10_2_0; + }; + in + lib.mapAttrs (_: pkg: doDistribute (pkg.overrideScope hls_overlay)) { + haskell-language-server = allowInconsistentDependencies super.haskell-language-server; + # Tests fail due to the newly-build fourmolu not being in PATH + # https://github.com/fourmolu/fourmolu/issues/231 + fourmolu = dontCheck super.fourmolu_0_14_0_0; + ormolu = self.generateOptparseApplicativeCompletions [ "ormolu" ] (enableSeparateBinOutput super.ormolu_0_7_2_0); + hlint = super.hlint_3_6_1; + stylish-haskell = super.stylish-haskell; + } + ) + haskell-language-server + # HLS from 2.3 needs at least formolu 0.14. + # This means we need to bump a lot of other tools, too, because they all us ghc-lib-parser + # We do this globally to prevent inconsistent formatting or lints between hls and the command line tools. + fourmolu + ormolu + hlint + stylish-haskell + ; } |