From 7cee400da6544fbad0eaf8344a9bccb9c4f899f6 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Tue, 16 Sep 2025 16:29:38 +0200 Subject: [PATCH] haskellPackages.ghc-typelits-natnormalise: restrict to < 0.8 This seems the best course of action: We are still only performing a non-breaking update compared to Stackage LTS (which will fix a few builds) while being able to execute the test suite. haskellPackages.ghc-tcplugins-extra: 0.4.8 -> 0.5 ghc-typelits-natnormalise requires >= 0.5 since 0.7.11. It does not look like the 0.5 update actually contains a breaking changes, so this update is probably safe: https://github.com/clash-lang/ghc-tcplugins-extra/pull/29#issuecomment-3299008674 https://github.com/clash-lang/ghc-tcplugins-extra/compare/702dda2095c66c4f5148a749c8b7dbcc8a09f5c...v0.5.0 --- .../haskell-modules/configuration-common.nix | 9 +++++ .../configuration-ghc-9.10.x.nix | 3 -- .../configuration-hackage2nix/main.yaml | 1 + .../haskell-modules/hackage-packages.nix | 40 +++++++++++++++++++ 4 files changed, 50 insertions(+), 3 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 251c8e1563200..9451b79adeca4 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -2885,6 +2885,15 @@ with haskellLib; dontCheck ]; + # 2025-09-16: 0.5 adds support for GHC 9.12 and doesn't actually seem to contain a + # breaking change, so we can upgrade beyond Stackage. + # https://github.com/clash-lang/ghc-tcplugins-extra/pull/29#issuecomment-3299008674 + # https://github.com/clash-lang/ghc-tcplugins-extra/compare/702dda2095c66c4f5148a749c8b7dbcc8a09f5c...v0.5.0 + ghc-tcplugins-extra = doDistribute self.ghc-tcplugins-extra_0_5; + # 2025-09-11: Tests have been fixed in 0.7.12, but it requests ghc-tcplugins-extra >= 0.5 + # which Stackage LTS won't update to, but we can. + ghc-typelits-natnormalise = doDistribute self.ghc-typelits-natnormalise_0_7_12; + # Test files missing from sdist # https://github.com/tweag/webauthn/issues/166 webauthn = dontCheck super.webauthn; 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 c1ab6a5306baf..9bf63d98ac6bb 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.10.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.10.x.nix @@ -74,9 +74,6 @@ in # Upgrade to accommodate new core library versions, where the authors have # already made the relevant changes. - # 2025-09-11: Tests fail, were fixed in 0.7.12, but Stackage is still at 0.7.10. - ghc-typelits-natnormalise = doDistribute self.ghc-typelits-natnormalise_0_8_0; - # # Jailbreaks # diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml index d645b780323e2..4dfef1e27b2e4 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml @@ -79,6 +79,7 @@ extra-packages: - 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.* + - ghc-typelits-natnormalise < 0.8 # 2025-09-15: Stackage is stuck at 0.7.10 - happy == 1.20.* # for ghc-lib-parser == 9.6.* - hashable < 1.5 # 2025-07-30: hashable >= 1.5 requires GHC >= 9.6 - hasql < 1.7 # 2025-01-19: Needed for building postgrest diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 4975c54a83af7..e518fce04ed9b 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -260150,6 +260150,46 @@ self: { } ) { }; + ghc-typelits-natnormalise_0_7_12 = callPackage ( + { + mkDerivation, + base, + containers, + ghc, + ghc-bignum, + ghc-prim, + ghc-tcplugins-extra, + tasty, + tasty-hunit, + template-haskell, + transformers, + }: + mkDerivation { + pname = "ghc-typelits-natnormalise"; + version = "0.7.12"; + sha256 = "03yrh9nrvnnb6ay2xy12jx94pxicjwrxc9wdnpw2qkca06z5sxla"; + libraryHaskellDepends = [ + base + containers + ghc + ghc-bignum + ghc-tcplugins-extra + template-haskell + transformers + ]; + testHaskellDepends = [ + base + ghc-prim + tasty + tasty-hunit + template-haskell + ]; + description = "GHC typechecker plugin for types of kind GHC.TypeLits.Nat"; + license = lib.licenses.bsd2; + hydraPlatforms = lib.platforms.none; + } + ) { }; + ghc-typelits-natnormalise_0_8_0 = callPackage ( { mkDerivation,