From c87d14a770c99ae9c01cb019a8134edf31944bce Mon Sep 17 00:00:00 2001 From: Malte Brandy Date: Sat, 5 Feb 2022 03:13:24 +0100 Subject: [PATCH] haskell.packages.ghc902.haskell-language-server: Enable all working plugins --- .../configuration-ghc-9.0.x.nix | 17 +++------- .../configuration-hackage2nix/main.yaml | 1 + .../haskell-modules/hackage-packages.nix | 34 +++++++++++++++++++ 3 files changed, 39 insertions(+), 13 deletions(-) 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 819b8655f5e2..c628fe95f7c5 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix @@ -150,23 +150,14 @@ self: super: { # Fixes a bug triggered on GHC 9.0.1 text-short = self.text-short_0_1_5; - # 2021-09-18: The following plugins don‘t work yet on ghc9. - haskell-language-server = appendConfigureFlags [ - "-f-tactic" - "-f-splice" - "-f-refineimports" - "-f-class" + fourmolu = doJailbreak self.fourmolu_0_4_0_0; - "-f-fourmolu" + # 2022-02-05: The following plugins don‘t work yet on ghc9. + # Compare: https://haskell-language-server.readthedocs.io/en/latest/supported-versions.html + haskell-language-server = appendConfigureFlags [ "-f-brittany" "-f-stylishhaskell" ] (super.haskell-language-server.override { - hls-tactics-plugin = null; # No upstream support, generic-lens-core fail - hls-splice-plugin = null; # No upstream support in hls 1.4.0, should be fixed in 1.5 - hls-refine-imports-plugin = null; # same issue es splice-plugin - hls-class-plugin = null; # No upstream support - - hls-fourmolu-plugin = null; # No upstream support, needs new fourmolu release hls-stylish-haskell-plugin = null; # No upstream support hls-brittany-plugin = null; # Dependencies don't build with 9.0.1 }); diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml index 799a668ea075..56a6cb41cbaf 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml @@ -167,6 +167,7 @@ extra-packages: - brick == 0.64.* # 2021-12-03: matterhorn depends on brick < 0.65 - path == 0.9.0 # 2021-12-03: path version building with stackage genvalidity and GHC 9.0.2 - ormolu == 0.3.* # 2021-12-03: for HLS with GHC 9.0.2 + - fourmolu == 0.4.* # 2022-02-05: for HLS with GHC 9.0.2 package-maintainers: abbradar: diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 1e5d7ff77b33..cb57b7404f8e 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -98739,6 +98739,40 @@ self: { license = lib.licenses.bsd3; }) {}; + "fourmolu_0_4_0_0" = callPackage + ({ mkDerivation, aeson, ansi-terminal, base, bytestring, Cabal + , containers, Diff, directory, dlist, exceptions, filepath + , ghc-lib-parser, gitrev, hspec, hspec-discover, HsYAML + , HsYAML-aeson, mtl, optparse-applicative, path, path-io, syb + , temporary, text + }: + mkDerivation { + pname = "fourmolu"; + version = "0.4.0.0"; + sha256 = "1mq0h6nsl7ssfwh6zqhyja7w212vn8msmlm5iwwimca279hzwywb"; + revision = "1"; + editedCabalFile = "03bwhqj547brmgk191gy3k9xayi6fqqk2f5sbz3ail1bk7b73xnq"; + isLibrary = true; + isExecutable = true; + libraryHaskellDepends = [ + aeson ansi-terminal base bytestring Cabal containers Diff directory + dlist exceptions filepath ghc-lib-parser HsYAML HsYAML-aeson mtl + syb text + ]; + executableHaskellDepends = [ + base directory filepath ghc-lib-parser gitrev optparse-applicative + text + ]; + testHaskellDepends = [ + base containers directory filepath hspec path path-io temporary + text + ]; + testToolDepends = [ hspec-discover ]; + description = "A formatter for Haskell source code"; + license = lib.licenses.bsd3; + hydraPlatforms = lib.platforms.none; + }) {}; + "fourmolu_0_5_0_1" = callPackage ({ mkDerivation, aeson, ansi-terminal, array, base, bytestring , Cabal, containers, Diff, directory, dlist, exceptions, filepath