From f8ca8c031bcefb5823803582dddec1387e582a97 Mon Sep 17 00:00:00 2001 From: maralorn Date: Mon, 3 Apr 2023 16:27:33 +0200 Subject: [PATCH] haskell.packages.ghc96.haskell-language-server: Fix build --- .../haskell-modules/configuration-common.nix | 14 +++++++ .../configuration-ghc-9.6.x.nix | 42 +++++++++++++++++++ 2 files changed, 56 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index c97f2c2fe82d..7f8a77fe5784 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -176,6 +176,20 @@ self: super: { relative = "plugins/hls-stylish-haskell-plugin"; hash = "sha256-GtN9t5zMOROCDSLiscLZ5GmqDV+ql9R2z/+W++C2h2Q="; }) super.hls-stylish-haskell-plugin) else super.hls-stylish-haskell-plugin; + + hie-compat = if lib.versionAtLeast super.ghc.version "9.6" then overrideCabal + (drv: { + prePatch = drv.prePatch or "" + '' + "${pkgs.buildPackages.dos2unix}/bin/dos2unix" *.cabal + ''; + }) + (appendPatch (fetchpatch { + name = "hie-compat-9.6-compat.patch"; + url = "https://github.com/haskell/haskell-language-server/commit/191bda61fef34696a793503e639a53003ff70660.patch"; + relative = "hie-compat"; + hash = "sha256-z81+fwxwZ8BQWGRqTnh3XlQ6AG7EiaahdKjT+0lFu1Q="; + }) super.hie-compat) else super.hie-compat; + # For -f-auto see cabal.project in haskell-language-server. ghc-lib-parser-ex = addBuildDepend self.ghc-lib-parser (disableCabalFlag "auto" super.ghc-lib-parser-ex); diff --git a/pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix b/pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix index 9263a38c55a6..c7e7ce62219c 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix @@ -125,4 +125,46 @@ self: super: { # Test suite doesn't compile with base-4.18 / GHC 9.6 # https://github.com/dreixel/syb/issues/40 syb = dontCheck super.syb; + + # 2023-04-03: plugins disabled for hls 1.10.0.0 based on + # + haskell-language-server = super.haskell-language-server.override { + hls-ormolu-plugin = null; + hls-floskell-plugin = null; + hls-fourmolu-plugin = null; + hls-hlint-plugin = null; + hls-stylish-haskell-plugin = null; + }; + + MonadRandom = super.MonadRandom_0_6; + unix-compat = super.unix-compat_0_7; + lifted-base = dontCheck super.lifted-base; + hw-fingertree = dontCheck super.hw-fingertree; + hw-prim = dontCheck (doJailbreak super.hw-prim); + stm-containers = dontCheck super.stm-containers; + regex-tdfa = dontCheck super.regex-tdfa; + rebase = doJailbreak super.rebase_1_20; + rerebase = doJailbreak super.rerebase_1_20; + hiedb = dontCheck super.hiedb; + lucid = doJailbreak (dontCheck super.lucid); + retrie = dontCheck (super.retrie); + + ghc-exactprint = unmarkBroken (addBuildDepends (with self.ghc-exactprint.scope; [ + HUnit Diff data-default extra fail free ghc-paths ordered-containers silently syb + ]) super.ghc-exactprint_1_7_0_0); + + inherit (pkgs.lib.mapAttrs (_: doJailbreak ) super) + hls-cabal-plugin + algebraic-graphs + co-log-core + lens + cryptohash-sha1 + cryptohash-md5 + ghc-trace-events + tasty-hspec + constraints-extras + tree-diff + implicit-hie-cradle + focus + hie-compat; }