From 4df6d52d963430a6a33d545bc82553c57fec3f69 Mon Sep 17 00:00:00 2001 From: maralorn Date: Wed, 11 Jun 2025 09:32:24 +0200 Subject: [PATCH] haskell.packages.ghc910.haskell-language-server: Fix build --- .../configuration-ghc-9.10.x.nix | 19 ++-- .../configuration-hackage2nix/main.yaml | 1 + .../haskell-modules/hackage-packages.nix | 99 +++++++++++++++++++ 3 files changed, 107 insertions(+), 12 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-ghc-9.10.x.nix b/pkgs/development/haskell-modules/configuration-ghc-9.10.x.nix index 851d164099eb..40351fcd3635 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.10.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.10.x.nix @@ -81,6 +81,7 @@ in ghc-lib-parser-ex = doDistribute self.ghc-lib-parser-ex_9_10_0_0; htree = doDistribute self.htree_0_2_0_0; ormolu = doDistribute self.ormolu_0_7_7_0; + stylish-haskell = doDistribute self.stylish-haskell_0_15_0_1; # A given major version of ghc-exactprint only supports one version of GHC. ghc-exactprint = doDistribute self.ghc-exactprint_1_9_0_0; @@ -118,17 +119,11 @@ in hinotify = pkgs.haskell.lib.dontCheck super.hinotify; # https://github.com/kolmodin/hinotify/issues/38 monad-dijkstra = dontCheck super.monad-dijkstra; # needs hlint 3.10 - haskell-language-server = disableCabalFlag "retrie" ( - disableCabalFlag "hlint" ( - disableCabalFlag "stylishhaskel" ( - super.haskell-language-server.override { - stylish-haskell = null; - retrie = null; - apply-refact = null; - hlint = null; - } - ) - ) - ); + haskell-language-server = super.haskell-language-server.override { + floskell = null; + retrie = null; + hlint = null; + apply-refact = null; + }; } diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml index 7def5b35a564..dff0a6d7bfb4 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml @@ -116,6 +116,7 @@ extra-packages: - simple-get-opt < 0.5 # 2025-05-01: for crux-0.7.2 - stylish-haskell == 0.14.4.0 # 2022-09-19: preserve for ghc 9.0 - stylish-haskell == 0.14.5.0 # 2025-04-14: needed for hls with ghc-lib 9.6 + - stylish-haskell == 0.15.0.1 # 2025-04-14: needed for hls with ghc-lib 9.10 - tar == 0.6.0.0 # 2025-02-08: last version to not require os-string (which can't be built with GHC < 9.2) - text == 2.0.2 # 2023-09-14: Needed for elm (which is currently on ghc-8.10) - text-metrics < 0.3.3 # 2025-02-08: >= 0.3.3 uses GHC2021 diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index ab5392be317a..6ced4be90c72 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -641204,6 +641204,105 @@ self: { } ) { }; + "stylish-haskell_0_15_0_1" = callPackage ( + { + mkDerivation, + aeson, + base, + bytestring, + Cabal, + containers, + directory, + file-embed, + filepath, + ghc-lib-parser, + ghc-lib-parser-ex, + HsYAML, + HsYAML-aeson, + HUnit, + mtl, + optparse-applicative, + random, + regex-tdfa, + strict, + syb, + test-framework, + test-framework-hunit, + text, + }: + mkDerivation { + pname = "stylish-haskell"; + version = "0.15.0.1"; + sha256 = "02smg717ak2m5i7ciyz8vl91x39idmgd5d0ksljyak2jlj77ybr5"; + isLibrary = true; + isExecutable = true; + libraryHaskellDepends = [ + aeson + base + bytestring + Cabal + containers + directory + file-embed + filepath + ghc-lib-parser + ghc-lib-parser-ex + HsYAML + HsYAML-aeson + mtl + regex-tdfa + syb + text + ]; + executableHaskellDepends = [ + aeson + base + bytestring + Cabal + containers + directory + file-embed + filepath + ghc-lib-parser + ghc-lib-parser-ex + HsYAML + HsYAML-aeson + mtl + optparse-applicative + regex-tdfa + strict + syb + text + ]; + testHaskellDepends = [ + aeson + base + bytestring + Cabal + containers + directory + file-embed + filepath + ghc-lib-parser + ghc-lib-parser-ex + HsYAML + HsYAML-aeson + HUnit + mtl + random + regex-tdfa + syb + test-framework + test-framework-hunit + text + ]; + description = "Haskell code prettifier"; + license = lib.licenses.bsd3; + hydraPlatforms = lib.platforms.none; + mainProgram = "stylish-haskell"; + } + ) { }; + "stylish-haskell_0_15_1_0" = callPackage ( { mkDerivation,