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 84d0a30858f3..bd84ef84d49c 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix @@ -89,19 +89,22 @@ self: super: { mime-string = disableOptimization super.mime-string; # Older compilers need the latest ghc-lib to build this package. - hls-hlint-plugin = addBuildDepend self.ghc-lib super.hls-hlint-plugin; + hls-hlint-plugin = addBuildDepend self.ghc-lib (overrideCabal (drv: { + # Workaround for https://github.com/haskell/haskell-language-server/issues/2728 + postPatch = '' + sed -i 's/(GHC.RealSrcSpan x,/(GHC.RealSrcSpan x Nothing,/' src/Ide/Plugin/Hlint.hs + ''; + }) + super.hls-hlint-plugin); haskell-language-server = appendConfigureFlags [ "-f-fourmolu" "-f-stylishhaskell" "-f-brittany" - "-f-hlint" ] (super.haskell-language-server.override { # Not buildable on 8.10 hls-fourmolu-plugin = null; - # https://github.com/haskell/haskell-language-server/issues/2728 - hls-hlint-plugin = null; }); # ormolu 0.3 requires Cabal == 3.4