libpq: 17.6 -> 18.0 (#445761)

This commit is contained in:
Wolfgang Walther
2025-09-25 08:04:27 +00:00
committed by GitHub
2 changed files with 29 additions and 3 deletions
@@ -2,6 +2,7 @@
lib,
stdenv,
fetchurl,
fetchpatch,
bootstrap_cmds,
byacc, # can also use bison, but byacc has fewer dependencies
keyutils,
@@ -42,6 +43,15 @@ stdenv.mkDerivation rec {
hash = "sha256-GogyuMrZI+u/E5T2fi789B46SfRgKFpm41reyPoAU68=";
};
patches = lib.optionals stdenv.hostPlatform.isFreeBSD [
(fetchpatch {
name = "fix-missing-ENODATA.patch";
url = "https://cgit.freebsd.org/ports/plain/security/krb5-122/files/patch-lib_krad_packet.c?id=0501f716c4aff7880fde56e42d641ef504593b7d";
extraPrefix = "";
hash = "sha256-l8ev+WrDKbTqwgBRYhfJGELkCCE8mJTqVHFBvvCPvgE=";
})
];
outputs = [
"out"
"lib"
+19 -3
View File
@@ -20,6 +20,15 @@
postgresql,
buildPackages,
# Curl
curlSupport ?
lib.meta.availableOn stdenv.hostPlatform curl
# Building statically fails with:
# configure: error: library 'curl' does not provide curl_multi_init
# https://www.postgresql.org/message-id/487dacec-6d8d-46c0-a36f-d5b8c81a56f1%40technowledgy.de
&& !stdenv.hostPlatform.isStatic,
curl,
# GSSAPI
gssSupport ? with stdenv.hostPlatform; !isWindows && !isStatic,
libkrb5,
@@ -31,14 +40,14 @@
stdenv.mkDerivation (finalAttrs: {
pname = "libpq";
version = "17.6";
version = "18.0";
src = fetchFromGitHub {
owner = "postgres";
repo = "postgres";
# rev, not tag, on purpose: see generic.nix.
rev = "refs/tags/REL_17_6";
hash = "sha256-/7C+bjmiJ0/CvoAc8vzTC50vP7OsrM6o0w+lmmHvKvU=";
rev = "refs/tags/REL_18_0";
hash = "sha256-xA6gbJe4tIV9bYRFrdI4Rfy20ZwTkvyyjt7ZxvCFEec=";
};
__structuredAttrs = true;
@@ -61,6 +70,7 @@ stdenv.mkDerivation (finalAttrs: {
zlib
openssl
]
++ lib.optionals curlSupport [ curl ]
++ lib.optionals gssSupport [ libkrb5 ]
++ lib.optionals nlsSupport [ gettext ];
@@ -109,6 +119,7 @@ stdenv.mkDerivation (finalAttrs: {
"--without-perl"
"--without-readline"
]
++ lib.optionals curlSupport [ "--with-libcurl" ]
++ lib.optionals gssSupport [ "--with-gssapi" ]
++ lib.optionals nlsSupport [ "--enable-nls" ];
@@ -134,6 +145,11 @@ stdenv.mkDerivation (finalAttrs: {
make -C src/common install pg_config.env
make -C src/include install
make -C src/interfaces/libpq install
''
+ lib.optionalString curlSupport ''
make -C src/interfaces/libpq-oauth install
''
+ ''
make -C src/port install
substituteInPlace src/common/pg_config.env \