diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index f0316eefb3658..c6e0327c919c6 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -2667,22 +2667,6 @@ self: super: { ghc-source-gen = doJailbreak super.ghc-source-gen; ghc-source-gen_0_4_5_0 = doJailbreak super.ghc-source-gen_0_4_5_0; - psqueues = lib.pipe super.psqueues [ - (overrideCabal { editedCabalFile = null; revision = null; } ) - (appendPatch - # https://github.com/jaspervdj/psqueues/pull/59 - (pkgs.fetchpatch { - url = "https://github.com/jaspervdj/psqueues/commit/281e458a3aa69b1cfc97f32e39eee0bee3035b3f.patch"; - hash = "sha256-dcL2QShMMaiENhdGsLiVYTuorNb20NSBTHsGBM04ULw="; - })) - ]; - - # Support tasty-quickcheck 0.11: https://github.com/nikita-volkov/deferred-folds/pull/8 - deferred-folds = appendPatch (fetchpatch { - url = "https://github.com/nikita-volkov/deferred-folds/commit/27bd67d49f52d6826ea69c3a85e5297408266ad0.patch"; - sha256 = "sha256-4LUoAIX0e4VZrka6nIrlccBHDMTbd1hGQCtRoJDAl74="; - }) super.deferred-folds; - # Support tasty-quickcheck 0.11: https://github.com/Bodigrim/mod/pull/26 mod = appendPatch (fetchpatch { url = "https://github.com/Bodigrim/mod/commit/30596fb9d85b69ec23ecb05ef9a7c91d67901cfd.patch"; @@ -2787,36 +2771,44 @@ self: super: { # https://github.com/brandonchinn178/tasty-autocollect/issues/54 tasty-autocollect = dontCheck super.tasty-autocollect; - postgrest = lib.pipe super.postgrest [ - # 2023-12-20: New version needs extra dependencies - (addBuildDepends [ self.extra self.fuzzyset_0_2_4 self.cache self.timeit ]) - # 2022-12-02: Too strict bounds. - doJailbreak - # 2022-12-02: Hackage release lags behind actual releases: https://github.com/PostgREST/postgrest/issues/2275 - (overrideSrc rec { - version = "12.0.3"; - src = pkgs.fetchFromGitHub { - owner = "PostgREST"; - repo = "postgrest"; - rev = "v${version}"; - hash = "sha256-peXM5/K034Phcy5vNhc5AT3/9oGXohVogFN9gRsSosY="; - }; - }) - # 2024-11-03: Needed for the patch below. Can be dropped after updating to 12.2+. - (appendPatches [ - (fetchpatch { - url = "https://github.com/PostgREST/postgrest/commit/d311fb17c46ad2ab9064c7aba1954d3500ef0e54.patch"; - hash = "sha256-O/bBm93V6GIPSB5dwhNUFgX3vXA01LPJapZQoeJmbIU="; - }) - ]) - # 2024-11-03: Fixes build on aarch64-darwin. Can be removed after updating to 13+. - (appendPatches [ - (fetchpatch { - url = "https://github.com/PostgREST/postgrest/commit/c045b261c4f7d2c2514e858120950be6b3ddfba8.patch"; - hash = "sha256-6SeteL5sb+/K1y3f9XL7yNzXDdD1KQp91RNP4kutSLE="; + # unbreak with tasty-quickcheck 0.11 + text-builder = super.text-builder_0_6_7_3; + + postgrest = lib.pipe + (super.postgrest.overrideScope (self: super: { + # 2025-01-19: Upstream is stuck at hasql < 1.7 + # Jailbreaking for newer postgresql-libpq, which seems to work fine + postgresql-binary = dontCheck (doJailbreak super.postgresql-binary_0_13_1_3); + hasql = dontCheck (doJailbreak super.hasql_1_6_4_4); + # Matching dependencies for hasql < 1.6.x + hasql-dynamic-statements = dontCheck super.hasql-dynamic-statements_0_3_1_5; + hasql-implicits = dontCheck super.hasql-implicits_0_1_1_3; + hasql-notifications = dontCheck super.hasql-notifications_0_2_2_0; + hasql-pool = dontCheck super.hasql-pool_1_0_1; + hasql-transaction = dontCheck super.hasql-transaction_1_1_0_1; + })) [ + # 2023-12-20: New version needs extra dependencies + (addBuildDepends [ self.extra self.fuzzyset_0_2_4 self.cache self.timeit self.prometheus-client ]) + # 2022-12-02: Too strict bounds. + doJailbreak + # 2022-12-02: Hackage release lags behind actual releases: https://github.com/PostgREST/postgrest/issues/2275 + (overrideSrc rec { + version = "12.2.7"; + src = pkgs.fetchFromGitHub { + owner = "PostgREST"; + repo = "postgrest"; + rev = "v${version}"; + hash = "sha256-4lKA+U7J8maKiDX9CWxWGjepGKSUu4ZOAA188yMt0bU="; + }; }) - ]) - ]; + # 2024-11-03: Fixes build on aarch64-darwin. Can be removed after updating to 13+. + (appendPatches [ + (fetchpatch { + url = "https://github.com/PostgREST/postgrest/commit/c045b261c4f7d2c2514e858120950be6b3ddfba8.patch"; + hash = "sha256-6SeteL5sb+/K1y3f9XL7yNzXDdD1KQp91RNP4kutSLE="; + }) + ]) + ]; # Too strict bounds on hspec < 2.11 fuzzyset_0_2_4 = doJailbreak super.fuzzyset_0_2_4; diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml index 56f6caa1b3491..d03905b7daa2c 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml @@ -108,6 +108,13 @@ extra-packages: - 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 + - postgresql-binary < 0.14 # 2025-01-19: Needed for building postgrest + - hasql < 1.7 # 2025-01-19: Needed for building postgrest + - hasql-dynamic-statements < 0.3.1.6 # 2025-01-19: Needed for building postgrest + - hasql-implicits < 0.2 # 2025-01-19: Needed for building postgrest + - hasql-notifications < 0.2.3 # 2025-01-19: Needed for building postgrest + - hasql-pool < 1.1 # 2025-01-19: Needed for building postgrest + - hasql-transaction < 1.1.1 # 2025-01-19: Needed for building postgrest - ShellCheck == 0.9.0 # 2024-03-21: pinned by haskell-ci - versions < 6 # 2024-04-22: required by spago-0.21 - fsnotify < 0.4 # 2024-04-22: required by spago-0.21 diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index f1de609ccb1df..95699a5e4c30e 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -1479,11 +1479,19 @@ self: super: builtins.intersectAttrs super { postgresql-libpq-configure = overrideCabal (drv: { - librarySystemDepends = (drv.librarySystemDepends or [ ]) ++ [ pkgs.postgresql ]; + librarySystemDepends = (drv.librarySystemDepends or [ ]) ++ [ pkgs.libpq ]; }) super.postgresql-libpq-configure; - postgresql-libpq-pkgconfig = addPkgconfigDepend pkgs.postgresql super.postgresql-libpq-pkgconfig; + postgresql-libpq-pkgconfig = addPkgconfigDepend + # Building postgresql-libpq with PG17 in pkgsStatic works fine, but downstream can't link against it with: + # > /nix/store/7ir63m9sbqzflf3yfynn45i109w6a5iz-x86_64-unknown-linux-musl-binutils-2.43.1/bin/x86_64-unknown-linux-musl-ld: + # /nix/store/vj7fwxbyvs15zrjbb9vafxbwmc05hl70-postgresql-static-x86_64-unknown-linux-musl-17.2-dev/lib/libpq.a(fe-connect.o): + # in function `PQsetClientEncoding': + # > (.text.PQsetClientEncoding+0xdf): undefined reference to `pg_encoding_to_char' + # Falling back to v16 to work around it. + (if pkgs.stdenv.hostPlatform.isStatic then pkgs.postgresql_16 else pkgs.libpq) + super.postgresql-libpq-pkgconfig; # Test failure is related to a GHC implementation detail of primitives and doesn't # cause actual problems in dependent packages, see https://github.com/lehins/pvar/issues/4 diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 85ab3fb9b2b53..22fd188e95c8c 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -144386,6 +144386,36 @@ self: { license = lib.licenses.mit; }) {inherit (pkgs) aspell;}; + "hasql_1_6_4_4" = callPackage + ({ mkDerivation, aeson, attoparsec, base, bytestring + , bytestring-strict-builder, contravariant, contravariant-extras + , criterion, dlist, hashable, hashtables, mtl, network-ip + , postgresql-binary, postgresql-libpq, profunctors + , quickcheck-instances, rerebase, scientific, tasty, tasty-hunit + , tasty-quickcheck, text, text-builder, time, transformers, uuid + , vector + }: + mkDerivation { + pname = "hasql"; + version = "1.6.4.4"; + sha256 = "1mwr9v5q5wvf1bk4lc7pdyyqf26snw23mxsz0j4mnrk7ybk6daad"; + libraryHaskellDepends = [ + aeson attoparsec base bytestring bytestring-strict-builder + contravariant dlist hashable hashtables mtl network-ip + postgresql-binary postgresql-libpq profunctors rerebase scientific + text text-builder time transformers uuid vector + ]; + testHaskellDepends = [ + contravariant-extras quickcheck-instances rerebase tasty + tasty-hunit tasty-quickcheck + ]; + benchmarkHaskellDepends = [ criterion rerebase ]; + doHaddock = false; + description = "An efficient PostgreSQL driver with a flexible mapping API"; + license = lib.licenses.mit; + hydraPlatforms = lib.platforms.none; + }) {}; + "hasql" = callPackage ({ mkDerivation, aeson, attoparsec, base, bytestring , bytestring-strict-builder, contravariant, contravariant-extras @@ -144527,6 +144557,27 @@ self: { broken = true; }) {}; + "hasql-dynamic-statements_0_3_1_5" = callPackage + ({ mkDerivation, base, bytestring, containers, hasql + , hasql-implicits, ptr, QuickCheck, quickcheck-instances, rerebase + , tasty, tasty-hunit, tasty-quickcheck + }: + mkDerivation { + pname = "hasql-dynamic-statements"; + version = "0.3.1.5"; + sha256 = "1h7c3r5vw6hndw9pi64609px2gq23g2d4hz5cgdb5ip36d7dck6p"; + libraryHaskellDepends = [ + base bytestring containers hasql hasql-implicits ptr + ]; + testHaskellDepends = [ + hasql QuickCheck quickcheck-instances rerebase tasty tasty-hunit + tasty-quickcheck + ]; + description = "Toolkit for constructing Hasql statements dynamically"; + license = lib.licenses.mit; + hydraPlatforms = lib.platforms.none; + }) {}; + "hasql-dynamic-statements" = callPackage ({ mkDerivation, base, bytestring, containers, hasql , hasql-implicits, ptr, rerebase, tasty, tasty-hunit @@ -144603,6 +144654,23 @@ self: { broken = true; }) {}; + "hasql-implicits_0_1_1_3" = callPackage + ({ mkDerivation, aeson, base, bytestring, containers, hasql + , network-ip, scientific, text, time, uuid, vector + }: + mkDerivation { + pname = "hasql-implicits"; + version = "0.1.1.3"; + sha256 = "1kd77zyn5wshbmrl64csxcgn09h2l20ys7v2232gvcp2lzm93dhi"; + libraryHaskellDepends = [ + aeson base bytestring containers hasql network-ip scientific text + time uuid vector + ]; + description = "Implicit definitions for Hasql, such as default codecs for standard types"; + license = lib.licenses.mit; + hydraPlatforms = lib.platforms.none; + }) {}; + "hasql-implicits" = callPackage ({ mkDerivation, aeson, base, bytestring, containers, hasql , iproute, scientific, text, time, uuid, vector @@ -144699,6 +144767,27 @@ self: { license = lib.licenses.bsd3; }) {}; + "hasql-notifications_0_2_2_0" = callPackage + ({ mkDerivation, base, bytestring, hasql, hasql-pool, hspec + , postgresql-libpq, QuickCheck, text + }: + mkDerivation { + pname = "hasql-notifications"; + version = "0.2.2.0"; + sha256 = "060fz6mwnb7q68v8aah455wmzfgk03a7bnr57zq5dm4wfm8cycaz"; + isLibrary = true; + isExecutable = true; + libraryHaskellDepends = [ + base bytestring hasql hasql-pool postgresql-libpq text + ]; + executableHaskellDepends = [ base hasql ]; + testHaskellDepends = [ base bytestring hasql hspec QuickCheck ]; + description = "LISTEN/NOTIFY support for Hasql"; + license = lib.licenses.bsd3; + hydraPlatforms = lib.platforms.none; + mainProgram = "hasql-notifications"; + }) {}; + "hasql-notifications" = callPackage ({ mkDerivation, base, bytestring, hasql, hasql-pool, hspec , postgresql-libpq, QuickCheck, text @@ -144767,6 +144856,23 @@ self: { license = lib.licenses.bsd3; }) {}; + "hasql-pool_1_0_1" = callPackage + ({ mkDerivation, async, base, bytestring, hasql, hspec, random + , rerebase, stm, text, time, uuid + }: + mkDerivation { + pname = "hasql-pool"; + version = "1.0.1"; + sha256 = "1z14fdpw1vjr07xz9mjv04i4implk71l61b1p3b1kl34zgvllg1y"; + libraryHaskellDepends = [ + base bytestring hasql stm text time uuid + ]; + testHaskellDepends = [ async hasql hspec random rerebase ]; + description = "Pool of connections for Hasql"; + license = lib.licenses.mit; + hydraPlatforms = lib.platforms.none; + }) {}; + "hasql-pool" = callPackage ({ mkDerivation, async, base, bytestring, hasql, hspec, random , rerebase, stm, text, time, uuid @@ -145046,6 +145152,25 @@ self: { license = lib.licenses.mit; }) {}; + "hasql-transaction_1_1_0_1" = callPackage + ({ mkDerivation, async, base, bytestring, bytestring-tree-builder + , contravariant, contravariant-extras, hasql, mtl, rerebase + , transformers + }: + mkDerivation { + pname = "hasql-transaction"; + version = "1.1.0.1"; + sha256 = "1b59lrr046hs7g01n5lq9g0si2cfc2zhz5r92g31b4c3cr8va3hv"; + libraryHaskellDepends = [ + base bytestring bytestring-tree-builder contravariant + contravariant-extras hasql mtl transformers + ]; + testHaskellDepends = [ async contravariant-extras hasql rerebase ]; + description = "Composable abstraction over retryable transactions for Hasql"; + license = lib.licenses.mit; + hydraPlatforms = lib.platforms.none; + }) {}; + "hasql-transaction" = callPackage ({ mkDerivation, async, base, bytestring, bytestring-tree-builder , contravariant, hasql, mtl, rerebase, transformers @@ -244167,6 +244292,32 @@ self: { broken = true; }) {}; + "postgresql-binary_0_13_1_3" = callPackage + ({ mkDerivation, aeson, base, binary-parser, bytestring + , bytestring-strict-builder, containers, criterion, network-ip + , postgresql-libpq, QuickCheck, quickcheck-instances, rerebase + , scientific, tasty, tasty-hunit, tasty-quickcheck, text, time + , transformers, unordered-containers, uuid, vector + }: + mkDerivation { + pname = "postgresql-binary"; + version = "0.13.1.3"; + sha256 = "1w71jb34z4810i32i9aa17x7if5ssj25gqvi15k2rf1g2lmwp7ry"; + libraryHaskellDepends = [ + aeson base binary-parser bytestring bytestring-strict-builder + containers network-ip scientific text time transformers + unordered-containers uuid vector + ]; + testHaskellDepends = [ + aeson network-ip postgresql-libpq QuickCheck quickcheck-instances + rerebase tasty tasty-hunit tasty-quickcheck + ]; + benchmarkHaskellDepends = [ criterion rerebase ]; + description = "Encoders and decoders for the PostgreSQL's binary format"; + license = lib.licenses.mit; + hydraPlatforms = lib.platforms.none; + }) {}; + "postgresql-binary" = callPackage ({ mkDerivation, aeson, base, binary-parser, bytestring , bytestring-strict-builder, containers, criterion, iproute diff --git a/pkgs/top-level/release-haskell.nix b/pkgs/top-level/release-haskell.nix index 4c44d6624fd30..2e59d6483bff8 100644 --- a/pkgs/top-level/release-haskell.nix +++ b/pkgs/top-level/release-haskell.nix @@ -455,6 +455,7 @@ let cabal2nix terminfo # isn't bundled for cross xhtml # isn't bundled for cross + postgrest ; }; @@ -467,6 +468,7 @@ let cabal2nix terminfo # isn't bundled for cross xhtml # isn't bundled for cross + postgrest ; };