From 2ec5fbd5f232a1fd35527ed59911a483e6a0a3c0 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 6 Apr 2025 11:24:26 +0200 Subject: [PATCH] haskellPackages.postgresql-libpq-pkgconfig: use libpq v17 in pkgsStatic The libpq build in pkgsStatic has been fixed on staging in 9f3bea8dca5d7133f23adc76544e9c2555ea8277. --- .../development/haskell-modules/configuration-nix.nix | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index 15565a3f4398..13a384cc0886 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -1654,16 +1654,7 @@ builtins.intersectAttrs super { librarySystemDepends = (drv.librarySystemDepends or [ ]) ++ [ pkgs.libpq ]; }) super.postgresql-libpq-configure; - 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; + postgresql-libpq-pkgconfig = addPkgconfigDepend 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