From 73aee49b49c6ba6c6b0aa0e0a2a9248d80168d50 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Tue, 4 Jun 2024 12:39:01 +0200 Subject: [PATCH 1/3] haskell.packages.ghc98.ghc-lib: downgrade to match ghc-lib-parser* I suspect that we'll be able to upgrade to 9.10.* for all three packages after the next haskell-language-server update. I'll leave that to maralorn. (cherry picked from commit b30eb6f3db8794aa9cd0283405d9bd697158dcf6) --- .../configuration-ghc-9.8.x.nix | 2 +- .../configuration-hackage2nix/main.yaml | 1 + .../haskell-modules/hackage-packages.nix | 22 +++++++++++++++++++ pkgs/top-level/release-haskell.nix | 6 ----- 4 files changed, 24 insertions(+), 7 deletions(-) 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 551a0ee99baee..a065117aaa087 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.8.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.8.x.nix @@ -55,7 +55,7 @@ self: super: { th-abstraction = doDistribute self.th-abstraction_0_7_0_0; ghc-lib-parser = doDistribute self.ghc-lib-parser_9_8_2_20240223; ghc-lib-parser-ex = doDistribute self.ghc-lib-parser-ex_9_8_0_2; - ghc-lib = doDistribute self.ghc-lib_9_10_1_20240511; + ghc-lib = doDistribute self.ghc-lib_9_8_2_20240223; megaparsec = doDistribute self.megaparsec_9_6_1; # TODO: remove when aeson updates or launches a revision # see https://github.com/haskell/aeson/issues/1089 and https://github.com/haskell/aeson/pulls/1088 diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml index 1ed7316a53d78..a6f37d09a66ef 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml @@ -66,6 +66,7 @@ extra-packages: - ghc-exactprint == 1.5.* # 2023-03-30: needed for GHC == 9.2 - ghc-exactprint == 1.6.* # 2023-03-30: needed for GHC == 9.4 - ghc-lib == 9.2.* # 2022-02-17: preserve for GHC 9.2 + - ghc-lib == 9.8.* # 2024-05-19: preserve for GHC 9.8 - ghc-lib-parser == 9.2.* # 2022-02-17: preserve for GHC 9.2 - ghc-lib-parser == 9.8.* # 2024-05-19: preserve for GHC 9.8 - ghc-lib-parser-ex == 9.2.* # 2022-07-13: preserve for GHC 9.2 diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 8e466b1f3c865..de7b600337f9f 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -119515,6 +119515,28 @@ self: { license = lib.licenses.bsd3; }) {}; + "ghc-lib_9_8_2_20240223" = callPackage + ({ mkDerivation, alex, array, base, binary, bytestring, containers + , deepseq, directory, exceptions, filepath, ghc-lib-parser + , ghc-prim, happy, hpc, parsec, pretty, process, rts + , semaphore-compat, stm, time, transformers, unix + }: + mkDerivation { + pname = "ghc-lib"; + version = "9.8.2.20240223"; + sha256 = "12lmk3ipd1pyiwzmnb0zgbw86yy7mhsy530dnackwidg3ww07nia"; + enableSeparateDataOutput = true; + libraryHaskellDepends = [ + array base binary bytestring containers deepseq directory + exceptions filepath ghc-lib-parser ghc-prim hpc parsec pretty + process rts semaphore-compat stm time transformers unix + ]; + libraryToolDepends = [ alex happy ]; + description = "The GHC API, decoupled from GHC versions"; + license = lib.licenses.bsd3; + hydraPlatforms = lib.platforms.none; + }) {}; + "ghc-lib_9_10_1_20240511" = callPackage ({ mkDerivation, alex, array, base, binary, bytestring, containers , deepseq, directory, exceptions, filepath, ghc-lib-parser diff --git a/pkgs/top-level/release-haskell.nix b/pkgs/top-level/release-haskell.nix index a778583172b2e..2db44040679a7 100644 --- a/pkgs/top-level/release-haskell.nix +++ b/pkgs/top-level/release-haskell.nix @@ -575,18 +575,12 @@ let compilerNames.ghc8107 ]; ghc-lib = lib.subtractLists [ - compilerNames.ghc981 - compilerNames.ghc982 compilerNames.ghc9101 ] released; ghc-lib-parser = lib.subtractLists [ - compilerNames.ghc981 - compilerNames.ghc982 compilerNames.ghc9101 ] released; ghc-lib-parser-ex = lib.subtractLists [ - compilerNames.ghc981 - compilerNames.ghc982 compilerNames.ghc9101 ] released; ghc-source-gen = [ From 9c8cdf17a8d5b8c0392a31680c393360a592b98f Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Tue, 4 Jun 2024 14:49:56 +0200 Subject: [PATCH 2/3] haskell.packages.ghc90.ghc-lib*: use 9.2.* versions This matches what we do for GHC 8.10.7 where we also can't build the 9.6 versions. (cherry picked from commit 8ff463e9fcfd21dc98285aa5ed223d11e62163c6) --- pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix | 5 +++++ 1 file changed, 5 insertions(+) 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 cdaa712ecd9aa..b0cc94c67428e 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix @@ -88,6 +88,11 @@ self: super: { # Needs to use ghc-lib due to incompatible GHC ghc-tags = doDistribute (addBuildDepend self.ghc-lib self.ghc-tags_1_6); + # ghc-lib >= 9.6 and friends no longer build with GHC 9.0 + ghc-lib-parser = doDistribute self.ghc-lib-parser_9_2_8_20230729; + ghc-lib-parser-ex = doDistribute self.ghc-lib-parser-ex_9_2_1_1; + ghc-lib = doDistribute self.ghc-lib_9_2_8_20230729; + # Test suite sometimes segfaults with GHC 9.0.1 and 9.0.2 # https://github.com/ekmett/reflection/issues/51 # https://gitlab.haskell.org/ghc/ghc/-/issues/21141 From a2df884e8726fd6931f4919796a35f42bd21769b Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Tue, 4 Jun 2024 14:51:22 +0200 Subject: [PATCH 3/3] haskell.packages.*.ghc-tags: unbreak This just requires picking the right version of the package for all compiler versions. (cherry picked from commit bd6942679cd7b7d8e2069d7efff37c23a12bdc9e) --- .../configuration-ghc-9.0.x.nix | 2 +- .../configuration-ghc-9.6.x.nix | 3 +++ .../configuration-hackage2nix/broken.yaml | 1 - .../configuration-hackage2nix/main.yaml | 8 +++--- .../haskell-modules/hackage-packages.nix | 27 ++++++++++++++++--- pkgs/top-level/release-haskell.nix | 9 +++---- 6 files changed, 35 insertions(+), 15 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 b0cc94c67428e..45cbd487762b2 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix @@ -86,7 +86,7 @@ self: super: { haskell-language-server = throw "haskell-language-server has dropped support for ghc 9.0 in version 2.4.0.0, please use a newer ghc version or an older nixpkgs version"; # Needs to use ghc-lib due to incompatible GHC - ghc-tags = doDistribute (addBuildDepend self.ghc-lib self.ghc-tags_1_6); + ghc-tags = doDistribute (addBuildDepend self.ghc-lib self.ghc-tags_1_5); # ghc-lib >= 9.6 and friends no longer build with GHC 9.0 ghc-lib-parser = doDistribute self.ghc-lib-parser_9_2_8_20230729; 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 14084bcf03d54..4edc24f10add2 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix @@ -69,6 +69,9 @@ self: super: { # https://github.com/mokus0/th-extras/pull/21 th-extras = doJailbreak super.th-extras; + # not in Stackage, needs to match ghc-lib + ghc-tags = doDistribute self.ghc-tags_1_7; + # # Too strict bounds without upstream fix # diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml index 977d1105c88ff..aa1145e26686e 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml @@ -2012,7 +2012,6 @@ broken-packages: - ghc-syb # failure in job https://hydra.nixos.org/build/233236783 at 2023-09-02 - ghc-syb-utils # failure in job https://hydra.nixos.org/build/233229196 at 2023-09-02 - ghc-symbol # failure in job https://hydra.nixos.org/build/252710738 at 2024-03-16 - - ghc-tags # failure in job https://hydra.nixos.org/build/252730131 at 2024-03-16 - ghc-tags-plugin # failure in job https://hydra.nixos.org/build/233229916 at 2023-09-02 - ghc-time-alloc-prof # failure in job https://hydra.nixos.org/build/233242289 at 2023-09-02 - ghc-usage # failure in job https://hydra.nixos.org/build/233199565 at 2023-09-02 diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml index a6f37d09a66ef..b63b8d01e104e 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml @@ -65,11 +65,12 @@ extra-packages: - ghc-exactprint == 0.6.* # 2022-12-12: needed for GHC < 9.2 - ghc-exactprint == 1.5.* # 2023-03-30: needed for GHC == 9.2 - ghc-exactprint == 1.6.* # 2023-03-30: needed for GHC == 9.4 - - ghc-lib == 9.2.* # 2022-02-17: preserve for GHC 9.2 + - ghc-exactprint == 1.8.* # 2024-05-20: needed for GHC == 9.8 + - ghc-lib == 9.2.* # 2022-02-17: preserve for GHC 8.10, 9.0 - ghc-lib == 9.8.* # 2024-05-19: preserve for GHC 9.8 - - ghc-lib-parser == 9.2.* # 2022-02-17: preserve for GHC 9.2 + - ghc-lib-parser == 9.2.* # 2022-02-17: preserve for GHC 8.10, 9.0 - ghc-lib-parser == 9.8.* # 2024-05-19: preserve for GHC 9.8 - - ghc-lib-parser-ex == 9.2.* # 2022-07-13: preserve for GHC 9.2 + - ghc-lib-parser-ex == 9.2.* # 2022-07-13: preserve for GHC 8.10, 9.0 - ghc-lib-parser-ex == 9.8.* # 2024-05-19: preserve for GHC 9.8 - ghc-syntax-highlighter == 0.0.10.* # 2023-11-20: - gi-soup == 2.4.28 # 2023-04-05: the last version to support libsoup-2.4 (and thus be compatible with our other gi- packages) @@ -118,6 +119,7 @@ extra-packages: - retrie < 1.2.0.0 # 2022-12-30: required for hls on ghc < 9.2 - ghc-tags == 1.5.* # 2023-02-18: preserve for ghc-lib == 9.2.* - ghc-tags == 1.6.* # 2023-02-18: preserve for ghc-lib == 9.4.* + - ghc-tags == 1.7.* # 2023-02-18: preserve for ghc-lib == 9.6.* - shake-cabal < 0.2.2.3 # 2023-07-01: last version to support Cabal 3.6.* - algebraic-graphs < 0.7 # 2023-08-14: Needed for building weeder < 2.6.0 - fuzzyset == 0.2.4 # 2023-12-20: Needed for building postgrest > 10 diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index de7b600337f9f..3ba08b3b12ff6 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -120264,7 +120264,6 @@ self: { license = lib.licenses.mpl20; hydraPlatforms = lib.platforms.none; mainProgram = "ghc-tags"; - broken = true; }) {}; "ghc-tags_1_6" = callPackage @@ -120288,7 +120287,29 @@ self: { license = lib.licenses.mpl20; hydraPlatforms = lib.platforms.none; mainProgram = "ghc-tags"; - broken = true; + }) {}; + + "ghc-tags_1_7" = callPackage + ({ mkDerivation, aeson, async, attoparsec, base, bytestring + , containers, deepseq, directory, filepath, ghc, ghc-boot + , ghc-paths, optparse-applicative, process, stm, temporary, text + , time, vector, yaml + }: + mkDerivation { + pname = "ghc-tags"; + version = "1.7"; + sha256 = "17189yi1zffgcdwx0nb6n4pbv3jhfajhfnag84fnqwy4kbvl5ma4"; + isLibrary = false; + isExecutable = true; + executableHaskellDepends = [ + aeson async attoparsec base bytestring containers deepseq directory + filepath ghc ghc-boot ghc-paths optparse-applicative process stm + temporary text time vector yaml + ]; + description = "Utility for generating ctags and etags with GHC API"; + license = lib.licenses.mpl20; + hydraPlatforms = lib.platforms.none; + mainProgram = "ghc-tags"; }) {}; "ghc-tags" = callPackage @@ -120310,9 +120331,7 @@ self: { ]; description = "Utility for generating ctags and etags with GHC API"; license = lib.licenses.mpl20; - hydraPlatforms = lib.platforms.none; mainProgram = "ghc-tags"; - broken = true; }) {}; "ghc-tags-core" = callPackage diff --git a/pkgs/top-level/release-haskell.nix b/pkgs/top-level/release-haskell.nix index 2db44040679a7..b05a796362924 100644 --- a/pkgs/top-level/release-haskell.nix +++ b/pkgs/top-level/release-haskell.nix @@ -585,16 +585,13 @@ let ] released; ghc-source-gen = [ # Feel free to remove these as they break, - # ghc-source-gen currently doesn't support GHC 9.4 compilerNames.ghc8107 compilerNames.ghc902 compilerNames.ghc928 ]; - # broken on 2024-03-16 - # ghc-tags = lib.subtractLists [ - # compilerNames.ghc981 - # compilerNames.ghc982 - # ] released; + ghc-tags = lib.subtractLists [ + compilerNames.ghc9101 + ] released; hashable = lib.subtractLists [ compilerNames.ghc981 compilerNames.ghc982