diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 611919a354e9..c64039f95793 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -255,10 +255,24 @@ with haskellLib; super // { # HLS 2.11: Too strict bound on Diff 1.0. - haskell-language-server = dontCheck (doJailbreak super.haskell-language-server); + haskell-language-server = lib.pipe super.haskell-language-server [ + dontCheck + doJailbreak + ( + if versionOlder self.ghc.version "9.10" || versionOlder "9.11" self.ghc.version then + addBuildDepends [ + self.apply-refact + self.hlint + self.refact + ] + else + lib.id + ) + ]; } ) ) + hlint fourmolu ormolu haskell-language-server 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 7d0853cc057f..7673e54c2e74 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.4.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.4.x.nix @@ -121,7 +121,7 @@ self: super: { tar = self.tar_0_6_3_0; # A given major version of ghc-exactprint only supports one version of GHC. - ghc-exactprint = super.ghc-exactprint_1_6_1_3; + ghc-exactprint = dontCheck super.ghc-exactprint_1_6_1_3; # Too strict upper bound on template-haskell # https://github.com/mokus0/th-extras/issues/18 @@ -130,22 +130,32 @@ self: super: { # https://github.com/kowainik/relude/issues/436 relude = dontCheck super.relude; + haddock-library = doJailbreak super.haddock-library; + apply-refact = addBuildDepend self.data-default-class super.apply-refact; + path = self.path_0_9_5; inherit ( let hls_overlay = lself: lsuper: { Cabal-syntax = lself.Cabal-syntax_3_10_3_0; Cabal = lself.Cabal_3_10_3_0; + extensions = dontCheck (doJailbreak (lself.extensions_0_1_0_1)); }; in lib.mapAttrs (_: pkg: doDistribute (pkg.overrideScope hls_overlay)) { - haskell-language-server = allowInconsistentDependencies super.haskell-language-server; - fourmolu = doJailbreak self.fourmolu_0_14_0_0; # ansi-terminal, Diff + haskell-language-server = allowInconsistentDependencies ( + addBuildDepends [ self.retrie self.floskell ] super.haskell-language-server + ); + fourmolu = doJailbreak (dontCheck self.fourmolu_0_14_0_0); # ansi-terminal, Diff ormolu = doJailbreak self.ormolu_0_7_2_0; # ansi-terminal hlint = self.hlint_3_6_1; stylish-haskell = self.stylish-haskell_0_14_5_0; + retrie = doJailbreak (unmarkBroken super.retrie); + floskell = doJailbreak super.floskell; } ) + retrie + floskell haskell-language-server fourmolu ormolu 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 746115587fbf..351f10d84bae 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix @@ -109,7 +109,6 @@ in stm-containers = dontCheck super.stm-containers; regex-tdfa = dontCheck super.regex-tdfa; hiedb = dontCheck super.hiedb; - retrie = dontCheck super.retrie; # https://github.com/kowainik/relude/issues/436 relude = dontCheck (doJailbreak super.relude); @@ -198,8 +197,39 @@ in # A given major version of ghc-exactprint only supports one version of GHC. ghc-exactprint = addBuildDepend self.extra super.ghc-exactprint_1_7_1_0; - ghc-lib-parser = doDistribute self.ghc-lib-parser_9_10_3_20250912; - ghc-lib-parser-ex = doDistribute self.ghc-lib-parser-ex_9_10_0_0; + ghc-lib-parser = doDistribute self.ghc-lib-parser_9_8_5_20250214; + ghc-lib-parser-ex = doDistribute self.ghc-lib-parser-ex_9_8_0_2; + haddock-library = doJailbreak super.haddock-library; + apply-refact = addBuildDepend self.data-default-class super.apply-refact; + inherit + ( + let + hls_overlay = lself: lsuper: { + Cabal-syntax = lself.Cabal-syntax_3_10_3_0; + Cabal = lself.Cabal_3_10_3_0; + extensions = dontCheck (doJailbreak lself.extensions_0_1_0_1); + }; + in + lib.mapAttrs (_: pkg: doDistribute (pkg.overrideScope hls_overlay)) { + haskell-language-server = allowInconsistentDependencies ( + addBuildDepends [ self.retrie self.floskell ] super.haskell-language-server + ); + ormolu = doDistribute self.ormolu_0_7_4_0; + fourmolu = doDistribute (dontCheck (doJailbreak self.fourmolu_0_15_0_0)); + hlint = doDistribute self.hlint_3_8; + stylish-haskell = self.stylish-haskell_0_14_6_0; + retrie = doJailbreak (unmarkBroken super.retrie); + floskell = doJailbreak super.floskell; + } + ) + retrie + floskell + haskell-language-server + fourmolu + ormolu + hlint + stylish-haskell + ; } # super.ghc is required to break infinite recursion as Nix is strict in the attrNames // diff --git a/pkgs/development/haskell-modules/configuration-ghc-9.8.x.nix b/pkgs/development/haskell-modules/configuration-ghc-9.8.x.nix index 4023b746fe62..f739c9ddea64 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.8.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.8.x.nix @@ -104,6 +104,37 @@ in # A given major version of ghc-exactprint only supports one version of GHC. ghc-exactprint = doDistribute super.ghc-exactprint_1_8_0_0; - ghc-lib-parser = doDistribute self.ghc-lib-parser_9_10_3_20250912; - ghc-lib-parser-ex = doDistribute self.ghc-lib-parser-ex_9_10_0_0; + haddock-library = doJailbreak super.haddock-library; + apply-refact = addBuildDepend self.data-default-class super.apply-refact; + ghc-lib-parser = doDistribute self.ghc-lib-parser_9_8_5_20250214; + ghc-lib-parser-ex = doDistribute self.ghc-lib-parser-ex_9_8_0_2; + inherit + ( + let + hls_overlay = lself: lsuper: { + Cabal-syntax = lself.Cabal-syntax_3_10_3_0; + Cabal = lself.Cabal_3_10_3_0; + extensions = dontCheck (doJailbreak super.extensions_0_1_0_1); + }; + in + lib.mapAttrs (_: pkg: doDistribute (pkg.overrideScope hls_overlay)) { + haskell-language-server = allowInconsistentDependencies ( + addBuildDepends [ self.retrie self.floskell ] super.haskell-language-server + ); + ormolu = doDistribute self.ormolu_0_7_4_0; + fourmolu = doDistribute (dontCheck (doJailbreak self.fourmolu_0_15_0_0)); + hlint = doDistribute self.hlint_3_8; + stylish-haskell = self.stylish-haskell_0_14_6_0; + retrie = doJailbreak (unmarkBroken super.retrie); + floskell = doJailbreak super.floskell; + } + ) + retrie + floskell + haskell-language-server + fourmolu + ormolu + hlint + stylish-haskell + ; } diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml index 7f8e037af806..ea7be8f72bcf 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml @@ -60,7 +60,9 @@ extra-packages: - Cabal-syntax == 3.12.* - Cabal-syntax == 3.14.* - Cabal-syntax == 3.16.* # version required for cabal-install and other packages + - extensions == 0.1.0.1 # 2025-09-21: needed for Cabal 3.10 (fourmolo/ormolu with ghc 9.8) - fourmolu == 0.14.0.0 # 2023-11-13: for ghc-lib-parser 9.6 compat + - fourmolu == 0.15.0.0 # 2025-09-21: for ghc-lib-parser 9.8 compat - fsnotify < 0.4 # 2024-04-22: required by spago-0.21 - fuzzyset == 0.2.4 # 2023-12-20: Needed for building postgrest > 10 - ghc-exactprint == 0.6.* # 2022-12-12: needed for GHC < 9.2 @@ -74,10 +76,10 @@ extra-packages: - ghc-lib == 9.10.* # 2024-12-30: preserve for GHC 9.10/ghc-tags 1.9 - ghc-lib-parser == 9.2.* # 2022-02-17: preserve for GHC 8.10, 9.0 - ghc-lib-parser == 9.6.* # 2024-05-19: preserve for GHC 9.2, 9.4 - - ghc-lib-parser == 9.10.* # 2024-12-26: preserve for GHC 9.6, 9.8, 9.10 + - ghc-lib-parser == 9.8.* # 2024-12-26: preserve for GHC 9.6, 9.8 - ghc-lib-parser-ex == 9.2.* # 2022-07-13: preserve for GHC 8.10, 9.0 - ghc-lib-parser-ex == 9.6.* # 2024-05-19: preserve for GHC 9.2, 9.4 - - ghc-lib-parser-ex == 9.10.* # 2024-12-26: preserve for GHC 9.6, 9.8, 9.10 + - ghc-lib-parser-ex == 9.8.* # 2024-12-26: preserve for GHC 9.6, 9.8 - ghc-tags == 1.5.* # 2023-02-18: preserve for ghc-lib == 9.2.* - ghc-tags == 1.7.* # 2023-02-18: preserve for ghc-lib == 9.6.* - ghc-tags == 1.8.* # 2023-02-18: preserve for ghc-lib == 9.8.* @@ -91,13 +93,16 @@ extra-packages: - hasql-pool < 1.1 # 2025-01-19: Needed for building postgrest - hasql-transaction < 1.1.1 # 2025-01-19: Needed for building postgrest - hlint == 3.6.* # 2025-04-14: needed for hls with ghc-lib-parser 9.6 + - hlint == 3.8.* # 2025-09-21: needed for hls with ghc-lib-parser 9.8 - hpack == 0.38.1 # 2025-09-18: to match exact version upstream stack-3.7.1 uses - hspec-megaparsec == 2.2.0 # 2023-11-18: Latest version compatible with ghc 9.0 - language-javascript == 0.7.0.0 # required by purescript - network-run == 0.4.0 # 2024-10-20: for GHC 9.10/network == 3.1.* - ormolu == 0.5.2.0 # 2023-08-08: preserve for ghc 9.0 - ormolu == 0.7.2.0 # 2023-11-13: for ghc-lib-parser 9.6 compat + - ormolu == 0.7.4.0 # 2023-09-21: for ghc-lib-parser 9.8 compat - os-string == 1.* # 2025-07-30: dummy package we need for pre os-string GHCs + - path == 0.9.5 # 2025-09-21: Pin for hls on ghc 9.4 - postgresql-binary < 0.14 # 2025-01-19: Needed for building postgrest - primitive-unlifted == 0.1.3.1 # 2024-03-16: preserve for ghc 9.2 - retrie < 1.2.0.0 # 2022-12-30: preserve for ghc < 9.2 @@ -106,6 +111,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.14.6.0 # 2025-09-21: needed for hls with ghc-lib 9.8 - 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) - tar == 0.6.3.0 # 2025-08-17: last version to not require file-io and directory-ospath-streaming (for GHC < 9.6) diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index fc676dfd1df5..1aa2eb2b9c29 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -224744,6 +224744,69 @@ self: { } ) { }; + extensions_0_1_0_1 = callPackage ( + { + mkDerivation, + base, + bytestring, + Cabal, + colourista, + containers, + directory, + filepath, + ghc-boot-th, + hedgehog, + hspec, + hspec-hedgehog, + optparse-applicative, + parsec, + text, + }: + mkDerivation { + pname = "extensions"; + version = "0.1.0.1"; + sha256 = "1rf6jhmms6ll7mn9rh81amzb7nd4zjqcnxdzivw50dxcrcfmdiq2"; + revision = "1"; + editedCabalFile = "1ixf5bpxy840zdlg3gsl3whzii03fc5j16i591pakprsvprp04hk"; + isLibrary = true; + isExecutable = true; + libraryHaskellDepends = [ + base + bytestring + Cabal + containers + directory + filepath + ghc-boot-th + parsec + text + ]; + executableHaskellDepends = [ + base + colourista + containers + directory + filepath + optparse-applicative + text + ]; + testHaskellDepends = [ + base + bytestring + containers + ghc-boot-th + hedgehog + hspec + hspec-hedgehog + text + ]; + description = "Parse Haskell Language Extensions"; + license = lib.licenses.mpl20; + hydraPlatforms = lib.platforms.none; + mainProgram = "extensions"; + } + ) { }; + extensions = callPackage ( { mkDerivation, @@ -241026,6 +241089,114 @@ self: { } ) { }; + fourmolu_0_15_0_0 = callPackage ( + { + mkDerivation, + aeson, + ansi-terminal, + array, + base, + binary, + bytestring, + Cabal-syntax, + containers, + deepseq, + Diff, + directory, + file-embed, + filepath, + ghc-lib-parser, + hspec, + hspec-discover, + hspec-megaparsec, + megaparsec, + MemoTrie, + mtl, + optparse-applicative, + path, + path-io, + pretty, + process, + QuickCheck, + scientific, + syb, + temporary, + text, + th-env, + yaml, + }: + mkDerivation { + pname = "fourmolu"; + version = "0.15.0.0"; + sha256 = "11xy0k5zkhd0dz7ify0m466l90j8sblm9rzzwkc0nn0d8pxyizfq"; + revision = "1"; + editedCabalFile = "1a0wnrvygipxivjzjbbvl1vm4pc45p5p239z741xj9jj5kipjh9c"; + isLibrary = true; + isExecutable = true; + libraryHaskellDepends = [ + aeson + ansi-terminal + array + base + binary + bytestring + Cabal-syntax + containers + deepseq + Diff + directory + file-embed + filepath + ghc-lib-parser + megaparsec + MemoTrie + mtl + scientific + syb + text + yaml + ]; + executableHaskellDepends = [ + base + Cabal-syntax + containers + directory + filepath + ghc-lib-parser + optparse-applicative + text + th-env + yaml + ]; + testHaskellDepends = [ + base + bytestring + Cabal-syntax + containers + Diff + directory + filepath + ghc-lib-parser + hspec + hspec-megaparsec + megaparsec + path + path-io + pretty + process + QuickCheck + temporary + text + yaml + ]; + testToolDepends = [ hspec-discover ]; + description = "A formatter for Haskell source code"; + license = lib.licenses.bsd3; + hydraPlatforms = lib.platforms.none; + mainProgram = "fourmolu"; + } + ) { }; + fourmolu = callPackage ( { mkDerivation, @@ -258579,7 +258750,7 @@ self: { } ) { }; - ghc-lib-parser_9_10_3_20250912 = callPackage ( + ghc-lib-parser_9_8_5_20250214 = callPackage ( { mkDerivation, alex, @@ -258604,8 +258775,8 @@ self: { }: mkDerivation { pname = "ghc-lib-parser"; - version = "9.10.3.20250912"; - sha256 = "1ilh872nvzdvz1k9lnf3q4xwspbdgb9lcygfff1bnszf9jv14z7r"; + version = "9.8.5.20250214"; + sha256 = "1l07lkc4d9ryxy26fr7mry4691m0f3p0wi6b6l1jzr968hrs06cb"; enableSeparateDataOutput = true; libraryHaskellDepends = [ array @@ -258776,7 +258947,7 @@ self: { } ) { }; - ghc-lib-parser-ex_9_10_0_0 = callPackage ( + ghc-lib-parser-ex_9_8_0_2 = callPackage ( { mkDerivation, base, @@ -258792,8 +258963,8 @@ self: { }: mkDerivation { pname = "ghc-lib-parser-ex"; - version = "9.10.0.0"; - sha256 = "1v4nq8nvg9bpdnqgpy8pkzb05h7f9f6m2a6bcqj3j2i9jzqv7sb6"; + version = "9.8.0.2"; + sha256 = "1s4ibjdzrflb2r88srmdnslj09h78xqwdn6djcnirmnka7qrf09v"; libraryHaskellDepends = [ base bytestring @@ -258803,8 +258974,6 @@ self: { ]; testHaskellDepends = [ base - bytestring - containers directory extra filepath @@ -258813,7 +258982,7 @@ self: { tasty-hunit uniplate ]; - description = "Programming with GHC parse trees"; + description = "Algorithms on GHC parse trees"; license = lib.licenses.bsd3; hydraPlatforms = lib.platforms.none; } @@ -332010,6 +332179,80 @@ self: { } ) { }; + hlint_3_8 = callPackage ( + { + mkDerivation, + aeson, + ansi-terminal, + base, + bytestring, + cmdargs, + containers, + cpphs, + data-default, + deriving-aeson, + directory, + extra, + file-embed, + filepath, + filepattern, + ghc-lib-parser, + ghc-lib-parser-ex, + hscolour, + process, + refact, + text, + transformers, + uniplate, + unordered-containers, + utf8-string, + vector, + yaml, + }: + mkDerivation { + pname = "hlint"; + version = "3.8"; + sha256 = "0x5xkd8n9idmg334kj1kky6bcl4wl8ks4i87j3r8zwp75fv3dwm8"; + isLibrary = true; + isExecutable = true; + enableSeparateDataOutput = true; + libraryHaskellDepends = [ + aeson + ansi-terminal + base + bytestring + cmdargs + containers + cpphs + data-default + deriving-aeson + directory + extra + file-embed + filepath + filepattern + ghc-lib-parser + ghc-lib-parser-ex + hscolour + process + refact + text + transformers + uniplate + unordered-containers + utf8-string + vector + yaml + ]; + executableHaskellDepends = [ base ]; + description = "Source code suggestions"; + license = lib.licenses.bsd3; + hydraPlatforms = lib.platforms.none; + mainProgram = "hlint"; + maintainers = [ lib.maintainers.maralorn ]; + } + ) { }; + hlint = callPackage ( { mkDerivation, @@ -496339,6 +496582,100 @@ self: { } ) { }; + ormolu_0_7_4_0 = callPackage ( + { + mkDerivation, + ansi-terminal, + array, + base, + binary, + bytestring, + Cabal-syntax, + containers, + deepseq, + Diff, + directory, + file-embed, + filepath, + ghc-lib-parser, + hspec, + hspec-discover, + hspec-megaparsec, + megaparsec, + MemoTrie, + mtl, + optparse-applicative, + path, + path-io, + QuickCheck, + syb, + temporary, + text, + th-env, + }: + mkDerivation { + pname = "ormolu"; + version = "0.7.4.0"; + sha256 = "1s7a9crjhbsmjkdvpv8ycygpiikv96s96p3lmjik4pb3q7idir2z"; + revision = "5"; + editedCabalFile = "107p02xhq0gfacc6j8kackqn16a0wnayq7qpi26acvzqqyxhcjxy"; + isLibrary = true; + isExecutable = true; + libraryHaskellDepends = [ + ansi-terminal + array + base + binary + bytestring + Cabal-syntax + containers + deepseq + Diff + directory + file-embed + filepath + ghc-lib-parser + megaparsec + MemoTrie + mtl + syb + text + ]; + executableHaskellDepends = [ + base + Cabal-syntax + containers + directory + filepath + ghc-lib-parser + optparse-applicative + text + th-env + ]; + testHaskellDepends = [ + base + Cabal-syntax + containers + directory + filepath + ghc-lib-parser + hspec + hspec-megaparsec + megaparsec + path + path-io + QuickCheck + temporary + text + ]; + testToolDepends = [ hspec-discover ]; + description = "A formatter for Haskell source code"; + license = lib.licenses.bsd3; + hydraPlatforms = lib.platforms.none; + mainProgram = "ormolu"; + } + ) { }; + ormolu = callPackage ( { mkDerivation, @@ -507258,6 +507595,60 @@ self: { } ) { }; + path_0_9_5 = callPackage ( + { + mkDerivation, + aeson, + base, + bytestring, + deepseq, + exceptions, + filepath, + genvalidity, + genvalidity-hspec, + genvalidity-property, + hashable, + hspec, + mtl, + QuickCheck, + template-haskell, + text, + validity, + }: + mkDerivation { + pname = "path"; + version = "0.9.5"; + sha256 = "0cy4vilmhzhi5nfh4v2kyvizhjzjpjib3bvgm1sgmvjzj40dfgrd"; + libraryHaskellDepends = [ + aeson + base + deepseq + exceptions + filepath + hashable + template-haskell + text + ]; + testHaskellDepends = [ + aeson + base + bytestring + filepath + genvalidity + genvalidity-hspec + genvalidity-property + hspec + mtl + QuickCheck + template-haskell + validity + ]; + description = "Support for well-typed paths"; + license = lib.licenses.bsd3; + hydraPlatforms = lib.platforms.none; + } + ) { }; + path = callPackage ( { mkDerivation, @@ -644263,6 +644654,105 @@ self: { } ) { }; + stylish-haskell_0_14_6_0 = 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.14.6.0"; + sha256 = "1v72i3dxn30z832cs19sbnj5p40y873sv4kciaivd0ls7i5mm8vb"; + 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_0_1 = callPackage ( { mkDerivation,