From 9c990e0af8a07d5c9a638d31053fb36d351ded8a Mon Sep 17 00:00:00 2001 From: Marc Scholten Date: Mon, 20 Apr 2026 09:46:49 +0100 Subject: [PATCH] haskellPackages.ihp: pin to hasql 1.10 IHP needs hasql >= 1.10 via hasql-mapping. Use overrideScope to pin IHP to the newer hasql versions which are already available as version-suffixed extra-packages, keeping the Stackage LTS 24 defaults for the rest of the package set. The scope renames the hasql-stack attributes for IHP and unmarks hasql-mapping (which is version-resolution-specific, mirroring the hasql-notifications entry in the postgrest scope). hasql-mapping stays in broken.yaml because it genuinely fails against the default hasql 1.9.3.1 from Stackage LTS 24. dontCheck for the scoped deps lives in the top-level overlay so it can apply to the versioned attributes; tests are disabled because they connect to PostgreSQL / docker at runtime. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../haskell-modules/configuration-common.nix | 39 +++++++++++++++++++ .../haskell-modules/configuration-nix.nix | 8 ++++ 2 files changed, 47 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 24a76365b715..2cd0a70e57c9 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -3410,3 +3410,42 @@ with haskellLib; ]; } ) + +# 2026-04-01: IHP packages need hasql >= 1.10 (via hasql-mapping). +# The scope renames hasql-stack attrs to the 1.10 line and unmarks +# hasql-mapping, which only builds against hasql >= 1.10 and so stays +# broken at the top level. dontCheck for tests that need a live +# PostgreSQL lives in configuration-nix.nix on the versioned attrs. +// ( + let + ihpHasqlScope = self: super: { + hasql = doDistribute super.hasql_1_10_3; + hasql-dynamic-statements = doDistribute super.hasql-dynamic-statements_0_5_1; + hasql-notifications = doDistribute super.hasql-notifications_0_2_5_0; + hasql-pool = doDistribute super.hasql-pool_1_4_2; + hasql-transaction = doDistribute super.hasql-transaction_1_2_2; + postgresql-binary = doDistribute super.postgresql-binary_0_15_0_1; + text-builder = doDistribute super.text-builder_1_0_0_5; + hasql-mapping = doDistribute (unmarkBroken super.hasql-mapping); + postgresql-simple-postgresql-types = doDistribute ( + unmarkBroken super.postgresql-simple-postgresql-types + ); + }; + + ihpPackages = [ + "ihp" + "ihp-datasync" + "ihp-graphql" + "ihp-hspec" + "ihp-ide" + "ihp-job-dashboard" + "ihp-migrate" + "ihp-pglistener" + "ihp-ssc" + "ihp-typed-sql" + ]; + in + lib.genAttrs ihpPackages ( + name: haskellLib.doDistribute (haskellLib.unmarkBroken (super.${name}.overrideScope ihpHasqlScope)) + ) +) diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index feee4403b436..eae4e1c104f6 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -1553,6 +1553,14 @@ builtins.intersectAttrs super { # only test suite is testcontainers/docker-based postgresql-simple-postgresql-types = dontCheck super.postgresql-simple-postgresql-types; + # hasql 1.10 stack used by IHP — tests need a live PostgreSQL / docker + hasql_1_10_3 = dontCheck super.hasql_1_10_3; + hasql-dynamic-statements_0_5_1 = dontCheck super.hasql-dynamic-statements_0_5_1; + hasql-notifications_0_2_5_0 = dontCheck super.hasql-notifications_0_2_5_0; + hasql-pool_1_4_2 = dontCheck super.hasql-pool_1_4_2; + hasql-transaction_1_2_2 = dontCheck super.hasql-transaction_1_2_2; + postgresql-binary_0_15_0_1 = dontCheck super.postgresql-binary_0_15_0_1; + users-postgresql-simple = lib.pipe super.users-postgresql-simple [ (addTestToolDepends [ pkgs.postgresql