From 79a87d6750773315ce8ec9b0dfa52717a13e3aff Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Tue, 3 Mar 2026 18:50:52 +0100 Subject: [PATCH] haskell.packages.ghc902Binary: fix evaluation of package set These attributes need to be present, so that callPackage doesn't fail with an unrecoverable error on some members of the package set. This is not necessary for any package Hydra builds, but helps for listing/ inspecting the package set. --- .../haskell-modules/configuration-ghc-9.0.x.nix | 17 +++++++++++++++++ .../configuration-hackage2nix/main.yaml | 1 + .../haskell-modules/hackage-packages.nix | 14 ++++++++++++++ 3 files changed, 32 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 1454ea63b514..1fffe94c2a2c 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix @@ -37,4 +37,21 @@ self: super: { unix = null; xhtml = null; Win32 = null; + + # core pkgs on later GHCs that we can reasonably provide a stub + # or Hackage released version for (though they may not build). + Cabal-syntax = self.Cabal-syntax_3_6_0_0; + semaphore-compat = self.semaphore-compat_2_0_0; + os-string = self.os-string_2_0_10; + file-io = self.file-io_0_2_0; + # Would need 2.25.*, but let's not bother + haddock-api = self.haddock-api_2_29_1; + haddock-library = self.haddock-library_1_11_0; + + # core pkgs on later GHCs we can't provide at all + system-cxx-std-lib = null; + ghc-experimental = null; + ghc-internal = null; + ghc-platform = null; + ghc-toolchain = null; } diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml index cb007baa533e..4fc015f6b294 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml @@ -78,6 +78,7 @@ extra-packages: - Cabal == 3.14.* - Cabal == 3.16.* # version required for cabal-install and other packages - cabal-add == 0.1 # 2025-09-09: Only needed for hls 2.11 can be removed once we are past it. + - Cabal-syntax == 3.6.* # required for the GHC 9.0.2 package set - Cabal-syntax == 3.10.* - Cabal-syntax == 3.12.* - Cabal-syntax == 3.14.* diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 97edc71c12d7..d3be4304a3da 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -6122,6 +6122,20 @@ self: { } ) { }; + Cabal-syntax_3_6_0_0 = callPackage ( + { mkDerivation, Cabal }: + mkDerivation { + pname = "Cabal-syntax"; + version = "3.6.0.0"; + sha256 = "0lcj4g55sj5iv727g7k57pscgyj0fx3smwapm1gmd5qkc3yfa9fa"; + libraryHaskellDepends = [ Cabal ]; + doHaddock = false; + description = "A library for working with .cabal files"; + license = lib.licenses.bsd3; + hydraPlatforms = lib.platforms.none; + } + ) { }; + Cabal-syntax_3_10_3_0 = callPackage ( { mkDerivation,