about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/sql
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/servers/sql')
-rw-r--r--nixpkgs/pkgs/servers/sql/mariadb/connector-c/3_1.nix2
-rw-r--r--nixpkgs/pkgs/servers/sql/mariadb/connector-c/3_2.nix2
-rw-r--r--nixpkgs/pkgs/servers/sql/mariadb/connector-c/3_3.nix2
-rw-r--r--nixpkgs/pkgs/servers/sql/mariadb/connector-c/default.nix8
-rw-r--r--nixpkgs/pkgs/servers/sql/mariadb/default.nix5
-rw-r--r--nixpkgs/pkgs/servers/sql/mariadb/patch/0001-Fix-build-with-libxml2-2.12.patch167
-rw-r--r--nixpkgs/pkgs/servers/sql/postgresql/default.nix22
-rw-r--r--nixpkgs/pkgs/servers/sql/postgresql/ext/age.nix13
-rw-r--r--nixpkgs/pkgs/servers/sql/postgresql/ext/pg_partman.nix4
-rw-r--r--nixpkgs/pkgs/servers/sql/postgresql/ext/pgroonga.nix4
-rw-r--r--nixpkgs/pkgs/servers/sql/postgresql/ext/plpgsql_check.nix4
-rw-r--r--nixpkgs/pkgs/servers/sql/postgresql/ext/timescaledb.nix4
-rw-r--r--nixpkgs/pkgs/servers/sql/postgresql/patches/libxml2.12-15.patch22
13 files changed, 237 insertions, 22 deletions
diff --git a/nixpkgs/pkgs/servers/sql/mariadb/connector-c/3_1.nix b/nixpkgs/pkgs/servers/sql/mariadb/connector-c/3_1.nix
index f5de11c7cc11..a51fc1d104b1 100644
--- a/nixpkgs/pkgs/servers/sql/mariadb/connector-c/3_1.nix
+++ b/nixpkgs/pkgs/servers/sql/mariadb/connector-c/3_1.nix
@@ -2,5 +2,5 @@
 
 callPackage ./. (args // {
   version = "3.1.21";
-  hash = "sha256-PovyQvomT8+vGWS39/QjLauiGkSiuqKQpTrSXdyVyow=";
+  hash = "sha256-guN3Rcsb/EV4rxPE3yhJRSsT1+z44zUetg7ZBA4WjIc=";
 })
diff --git a/nixpkgs/pkgs/servers/sql/mariadb/connector-c/3_2.nix b/nixpkgs/pkgs/servers/sql/mariadb/connector-c/3_2.nix
index d9ef5d8966fe..6619e261650c 100644
--- a/nixpkgs/pkgs/servers/sql/mariadb/connector-c/3_2.nix
+++ b/nixpkgs/pkgs/servers/sql/mariadb/connector-c/3_2.nix
@@ -2,5 +2,5 @@
 
 callPackage ./. (args // {
   version = "3.2.7";
-  hash = "sha256-nXGWJI5ml8Ccc+Fz/psoIEX1XsnXrnQ8HrrQi56lbdo=";
+  hash = "sha256-F7s9fcbJiz6lsWrvlTpY+ZET8MPwlyWPKJZOvHEwBvo=";
 })
diff --git a/nixpkgs/pkgs/servers/sql/mariadb/connector-c/3_3.nix b/nixpkgs/pkgs/servers/sql/mariadb/connector-c/3_3.nix
index ec70d9998283..9f750fe8108b 100644
--- a/nixpkgs/pkgs/servers/sql/mariadb/connector-c/3_3.nix
+++ b/nixpkgs/pkgs/servers/sql/mariadb/connector-c/3_3.nix
@@ -2,5 +2,5 @@
 
 callPackage ./. (args // {
   version = "3.3.5";
-  hash = "sha256-ynLrJvbbK++nfkj/lm9xvNPLRLM72Lu4ELZebQEcHlw=";
+  hash = "sha256-RLHx8PyfbfIDr6X6ky5/w0XsGMFd+v5PgmQHvYOaf+k=";
 })
diff --git a/nixpkgs/pkgs/servers/sql/mariadb/connector-c/default.nix b/nixpkgs/pkgs/servers/sql/mariadb/connector-c/default.nix
index 7a175620c7cb..be4af113c1d9 100644
--- a/nixpkgs/pkgs/servers/sql/mariadb/connector-c/default.nix
+++ b/nixpkgs/pkgs/servers/sql/mariadb/connector-c/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, cmake
+{ lib, stdenv, fetchFromGitHub, cmake
 , curl, openssl, zlib, zstd
 , libiconv
 , version, hash, ...
@@ -13,8 +13,10 @@ in stdenv.mkDerivation {
   pname = "mariadb-connector-c";
   inherit version;
 
-  src = fetchurl {
-    url = "https://downloads.mariadb.com/Connectors/c/connector-c-${version}/mariadb-connector-c-${version}-src.tar.gz";
+  src = fetchFromGitHub {
+    owner = "mariadb-corporation";
+    repo = "mariadb-connector-c";
+    rev = "v${version}";
     inherit hash;
   };
 
diff --git a/nixpkgs/pkgs/servers/sql/mariadb/default.nix b/nixpkgs/pkgs/servers/sql/mariadb/default.nix
index 6cd3e2c7a014..3ff31ba1d3ab 100644
--- a/nixpkgs/pkgs/servers/sql/mariadb/default.nix
+++ b/nixpkgs/pkgs/servers/sql/mariadb/default.nix
@@ -58,6 +58,10 @@ let
 
       patches = [
         ./patch/cmake-includedir.patch
+
+        # Fix build with libxml 2.12 and Clang 16.
+        # https://github.com/MariaDB/server/pull/2983
+        ./patch/0001-Fix-build-with-libxml2-2.12.patch
       ]
         # Fixes a build issue as documented on
         # https://jira.mariadb.org/browse/MDEV-26769?focusedCommentId=206073&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-206073
@@ -234,7 +238,6 @@ let
       '';
 
       CXXFLAGS = lib.optionalString stdenv.hostPlatform.isi686 "-fpermissive";
-      NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isRiscV "-latomic";
     });
   in
     server // {
diff --git a/nixpkgs/pkgs/servers/sql/mariadb/patch/0001-Fix-build-with-libxml2-2.12.patch b/nixpkgs/pkgs/servers/sql/mariadb/patch/0001-Fix-build-with-libxml2-2.12.patch
new file mode 100644
index 000000000000..a12dfb73d09d
--- /dev/null
+++ b/nixpkgs/pkgs/servers/sql/mariadb/patch/0001-Fix-build-with-libxml2-2.12.patch
@@ -0,0 +1,167 @@
+From 1f1ee5d3776af7ef56ffa3f4dcd22532c2c86c74 Mon Sep 17 00:00:00 2001
+From: Jan Tojnar <jtojnar@gmail.com>
+Date: Sun, 7 Jan 2024 10:19:54 +0100
+Subject: [PATCH] Fix build with libxml2 2.12
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+libxml2 2.12.0 made `xmlGetLastError()` return `const` pointer:
+
+https://gitlab.gnome.org/GNOME/libxml2/-/commit/61034116d0a3c8b295c6137956adc3ae55720711
+
+Clang 16 does not like this:
+
+    error: assigning to 'xmlErrorPtr' (aka '_xmlError *') from 'const xmlError *' (aka 'const _xmlError *') discards qualifiers
+    error: cannot initialize a variable of type 'xmlErrorPtr' (aka '_xmlError *') with an rvalue of type 'const xmlError *' (aka 'const _xmlError *')
+
+Let’s update the variables to `const`.
+For older versions, it will be automatically converted.
+
+But then `xmlResetError(xmlError*)` will not like the `const` pointer:
+
+    error: no matching function for call to 'xmlResetError'
+    note: candidate function not viable: 1st argument ('const xmlError *' (aka 'const _xmlError *')) would lose const qualifier
+
+Let’s replace it with `xmlResetLastError()`.
+
+ALso remove `LIBXMLDOC::Xerr` protected member property.
+It was introduced in 65b0e5455b547a3d574fa77b34cce23ae3bea0a0
+along with the `xmlResetError` calls.
+It does not appear to be used for anything.
+---
+ storage/connect/libdoc.cpp | 39 +++++++++++++++++++-------------------
+ 1 file changed, 19 insertions(+), 20 deletions(-)
+
+diff --git a/storage/connect/libdoc.cpp b/storage/connect/libdoc.cpp
+index e414aa88355..10edcbc3ffa 100644
+--- a/storage/connect/libdoc.cpp
++++ b/storage/connect/libdoc.cpp
+@@ -93,7 +93,6 @@ class LIBXMLDOC : public XMLDOCUMENT {
+   xmlXPathContextPtr Ctxp;
+   xmlXPathObjectPtr  Xop;
+   xmlXPathObjectPtr  NlXop;
+-  xmlErrorPtr        Xerr;
+   char              *Buf;                  // Temporary
+   bool               Nofreelist;
+ }; // end of class LIBXMLDOC
+@@ -327,7 +326,6 @@ LIBXMLDOC::LIBXMLDOC(char *nsl, char *nsdf, char *enc, PFBLOCK fp)
+   Ctxp = NULL;
+   Xop = NULL;
+   NlXop = NULL;
+-  Xerr = NULL;
+   Buf = NULL;
+   Nofreelist = false;
+   } // end of LIBXMLDOC constructor
+@@ -365,8 +363,8 @@ bool LIBXMLDOC::ParseFile(PGLOBAL g, char *fn)
+       Encoding = (char*)Docp->encoding;
+ 
+     return false;
+-  } else if ((Xerr = xmlGetLastError()))
+-    xmlResetError(Xerr);
++  } else if (xmlGetLastError())
++    xmlResetLastError();
+ 
+   return true;
+   } // end of ParseFile
+@@ -505,9 +503,9 @@ int LIBXMLDOC::DumpDoc(PGLOBAL g, char *ofn)
+ #if 1
+   // This function does not crash (
+   if (xmlSaveFormatFileEnc((const char *)ofn, Docp, Encoding, 0) < 0) {
+-    xmlErrorPtr err = xmlGetLastError();
++    const xmlError *err = xmlGetLastError();
+     strcpy(g->Message, (err) ? err->message : "Error saving XML doc");
+-    xmlResetError(Xerr);
++    xmlResetLastError();
+     rc = -1;
+     } // endif Save
+ //  rc = xmlDocDump(of, Docp);
+@@ -546,8 +544,8 @@ void LIBXMLDOC::CloseDoc(PGLOBAL g, PFBLOCK xp)
+     if (Nlist) {
+       xmlXPathFreeNodeSet(Nlist);
+ 
+-      if ((Xerr = xmlGetLastError()))
+-        xmlResetError(Xerr);
++      if (xmlGetLastError())
++        xmlResetLastError();
+ 
+       Nlist = NULL;
+       } // endif Nlist
+@@ -555,8 +553,8 @@ void LIBXMLDOC::CloseDoc(PGLOBAL g, PFBLOCK xp)
+     if (Xop) {
+       xmlXPathFreeObject(Xop);
+ 
+-      if ((Xerr = xmlGetLastError()))
+-        xmlResetError(Xerr);
++      if (xmlGetLastError())
++        xmlResetLastError();
+ 
+       Xop = NULL;
+       } // endif Xop
+@@ -564,8 +562,8 @@ void LIBXMLDOC::CloseDoc(PGLOBAL g, PFBLOCK xp)
+     if (NlXop) {
+       xmlXPathFreeObject(NlXop);
+ 
+-      if ((Xerr = xmlGetLastError()))
+-        xmlResetError(Xerr);
++      if (xmlGetLastError())
++        xmlResetLastError();
+ 
+       NlXop = NULL;
+       } // endif NlXop
+@@ -573,8 +571,8 @@ void LIBXMLDOC::CloseDoc(PGLOBAL g, PFBLOCK xp)
+     if (Ctxp) {
+       xmlXPathFreeContext(Ctxp);
+ 
+-      if ((Xerr = xmlGetLastError()))
+-        xmlResetError(Xerr);
++      if (xmlGetLastError())
++        xmlResetLastError();
+ 
+       Ctxp = NULL;
+       } // endif Ctxp
+@@ -590,6 +588,7 @@ void LIBXMLDOC::CloseDoc(PGLOBAL g, PFBLOCK xp)
+ /******************************************************************/
+ xmlNodeSetPtr LIBXMLDOC::GetNodeList(PGLOBAL g, xmlNodePtr np, char *xp)
+   {
++  const xmlError *xerr;
+   xmlNodeSetPtr nl;
+ 
+   if (trace(1))
+@@ -649,11 +648,11 @@ xmlNodeSetPtr LIBXMLDOC::GetNodeList(PGLOBAL g, xmlNodePtr np, char *xp)
+     } else
+       xmlXPathFreeObject(Xop);            // Caused node not found
+ 
+-    if ((Xerr = xmlGetLastError())) {
+-      strcpy(g->Message, Xerr->message);
+-      xmlResetError(Xerr);
++    if ((xerr = xmlGetLastError())) {
++      strcpy(g->Message, xerr->message);
++      xmlResetLastError();
+       return NULL;
+-      } // endif Xerr
++      } // endif xerr
+ 
+     } // endif Xop
+ 
+@@ -1079,7 +1078,7 @@ void XML2NODE::AddText(PGLOBAL g, PCSZ txtp)
+ /******************************************************************/
+ void XML2NODE::DeleteChild(PGLOBAL g, PXNODE dnp)
+   {
+-  xmlErrorPtr xerr;
++  const xmlError *xerr;
+ 
+   if (trace(1))
+     htrc("DeleteChild: node=%p\n", dnp);
+@@ -1122,7 +1121,7 @@ void XML2NODE::DeleteChild(PGLOBAL g, PXNODE dnp)
+   if (trace(1))
+     htrc("DeleteChild: errmsg=%-.256s\n", xerr->message);
+ 
+-  xmlResetError(xerr);
++  xmlResetLastError();
+   } // end of DeleteChild
+ 
+ /* -------------------- class XML2NODELIST ---------------------- */
+-- 
+2.42.0
+
diff --git a/nixpkgs/pkgs/servers/sql/postgresql/default.nix b/nixpkgs/pkgs/servers/sql/postgresql/default.nix
index ec2f95f5bd55..11fae33a6edd 100644
--- a/nixpkgs/pkgs/servers/sql/postgresql/default.nix
+++ b/nixpkgs/pkgs/servers/sql/postgresql/default.nix
@@ -5,6 +5,7 @@ let
       { stdenv, lib, fetchurl, makeWrapper, fetchpatch
       , glibc, zlib, readline, openssl, icu, lz4, zstd, systemd, libossp_uuid
       , pkg-config, libxml2, tzdata, libkrb5, substituteAll, darwin
+      , linux-pam
 
       # This is important to obtain a version of `libpq` that does not depend on systemd.
       , enableSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd && !stdenv.hostPlatform.isStatic
@@ -24,6 +25,10 @@ let
       , nukeReferences, patchelf, llvmPackages
       , makeRustPlatform, buildPgxExtension, cargo, rustc
 
+      # PL/Python
+      , pythonSupport ? false
+      , python3
+
       # detection of crypt fails when using llvm stdenv, so we add it manually
       # for <13 (where it got removed: https://github.com/postgres/postgres/commit/c45643d618e35ec2fe91438df15abd4f3c0d85ca)
       , libxcrypt
@@ -62,7 +67,9 @@ let
       ++ lib.optionals lz4Enabled [ lz4 ]
       ++ lib.optionals zstdEnabled [ zstd ]
       ++ lib.optionals enableSystemd [ systemd ]
+      ++ lib.optionals pythonSupport [ python3 ]
       ++ lib.optionals gssSupport [ libkrb5 ]
+      ++ lib.optionals stdenv'.isLinux [ linux-pam ]
       ++ lib.optionals (!stdenv'.isDarwin) [ libossp_uuid ];
 
     nativeBuildInputs = [
@@ -95,8 +102,10 @@ let
     ] ++ lib.optionals lz4Enabled [ "--with-lz4" ]
       ++ lib.optionals zstdEnabled [ "--with-zstd" ]
       ++ lib.optionals gssSupport [ "--with-gssapi" ]
+      ++ lib.optionals pythonSupport [ "--with-python" ]
       ++ lib.optionals stdenv'.hostPlatform.isRiscV [ "--disable-spinlocks" ]
-      ++ lib.optionals jitSupport [ "--with-llvm" ];
+      ++ lib.optionals jitSupport [ "--with-llvm" ]
+      ++ lib.optionals stdenv'.isLinux [ "--with-pam" ];
 
     patches = [
       (if atLeast "16" then ./patches/disable-normalize_exec_path.patch
@@ -106,6 +115,17 @@ let
       ./patches/specify_pkglibdir_at_runtime.patch
       ./patches/findstring.patch
 
+      # Fix build with libxml2 2.12.0 and -Wincompatible-function-pointer-types
+      (if atLeast "16" then
+        # https://www.postgresql.org/message-id/CACpMh%2BDMZVHM%2BiDSyqdcpK8sr7jd_HxxLJRNvGTzcLBE0W07QA%40mail.gmail.com
+        fetchurl {
+          url = "https://www.postgresql.org/message-id/attachment/152769/v1-0001-Make-PostgreSQL-work-with-newer-version-of-libxml.patch";
+          hash = "sha256-1j5mtG++hFmYwfS98PdN1SmNI4T86q4FXvKLz2VeJyg=";
+        }
+      else
+        ./patches/libxml2.12-15.patch
+      )
+
       (substituteAll {
         src = ./locale-binary-path.patch;
         locale = "${if stdenv.isDarwin then darwin.adv_cmds else lib.getBin stdenv.cc.libc}/bin/locale";
diff --git a/nixpkgs/pkgs/servers/sql/postgresql/ext/age.nix b/nixpkgs/pkgs/servers/sql/postgresql/ext/age.nix
index 3a1c1c8388be..fb5d84992582 100644
--- a/nixpkgs/pkgs/servers/sql/postgresql/ext/age.nix
+++ b/nixpkgs/pkgs/servers/sql/postgresql/ext/age.nix
@@ -2,15 +2,16 @@
 
 let
   hashes = {
-    "15" = "sha256-1vmwoflbU3++PFDcsLt9gyLkuzMRGNCD7vWl7/6Q+SE=";
-    "14" = "sha256-w93Q499sZRk4q85A9yqKQjGUd9Pl8UL8K1D3W7mHRTU=";
-    "13" = "sha256-Sot7FR0oW7kWA680pNCMCmlflu4RfJTSWZn9mrXrpzw=";
-    "12" = "sha256-XezcXoHHLCD1/2OHmKhxome2pdjOsYAfZlpvOoU3aS4=";
+    "16" = "sha256-sXh/vmGyYj00ALfFVdeql2DZ6nCJQDNKyNgzlOZnPAw=";
+    "15" = "sha256-webZWgWZGnSoXwTpk816tjbtHV1UIlXkogpBDAEL4gM=";
+    "14" = "sha256-jZXhcYBubpjIJ8M5JHXKV5f6VK/2BkypH3P7nLxZz3E=";
+    "13" = "sha256-HR6nnWt/V2a0rD5eHHUsFIZ1y7lmvLz36URt9pPJnCw=";
+    "12" = "sha256-JFNk17ESsIt20dwXrfBkQ5E6DbZzN/Q9eS6+WjCXGd4=";
   };
 in
 stdenv.mkDerivation rec {
   pname = "age";
-  version = "1.4.0-rc0";
+  version = "1.5.0-rc0";
 
   src = fetchFromGitHub {
     owner = "apache";
@@ -28,7 +29,7 @@ stdenv.mkDerivation rec {
   ];
 
   installPhase = ''
-    install -D -t $out/lib *.so
+    install -D -t $out/lib *${postgresql.dlSuffix}
     install -D -t $out/share/postgresql/extension *.sql
     install -D -t $out/share/postgresql/extension *.control
   '';
diff --git a/nixpkgs/pkgs/servers/sql/postgresql/ext/pg_partman.nix b/nixpkgs/pkgs/servers/sql/postgresql/ext/pg_partman.nix
index e008993fcfa5..10e899f810d0 100644
--- a/nixpkgs/pkgs/servers/sql/postgresql/ext/pg_partman.nix
+++ b/nixpkgs/pkgs/servers/sql/postgresql/ext/pg_partman.nix
@@ -2,7 +2,7 @@
 
 stdenv.mkDerivation rec {
   pname = "pg_partman";
-  version = "5.0.0";
+  version = "5.0.1";
 
   buildInputs = [ postgresql ];
 
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
     owner  = "pgpartman";
     repo   = pname;
     rev    = "refs/tags/v${version}";
-    sha256 = "sha256-T7+cPi8LIftWVwI9mi0LAwWCTxp/r6iyKT1wKO/Ztbk=";
+    sha256 = "sha256-sJODpyRgqpeg/Lb584wNgCCFRaH22ELcbof1bA612aw=";
   };
 
   installPhase = ''
diff --git a/nixpkgs/pkgs/servers/sql/postgresql/ext/pgroonga.nix b/nixpkgs/pkgs/servers/sql/postgresql/ext/pgroonga.nix
index bb0f33490b7e..ee582067dd85 100644
--- a/nixpkgs/pkgs/servers/sql/postgresql/ext/pgroonga.nix
+++ b/nixpkgs/pkgs/servers/sql/postgresql/ext/pgroonga.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "pgroonga";
-  version = "3.1.5";
+  version = "3.1.6";
 
   src = fetchurl {
     url = "https://packages.groonga.org/source/${pname}/${pname}-${version}.tar.gz";
-    hash = "sha256-ddJe+3l11O5vXfSzIT03AF6ekVmGQPVos54dSpjQnpI=";
+    hash = "sha256-XfHpKstgdBQ6Oo0cDpOphUJNTu9KgfBuxAa8RadvjyA=";
   };
 
   nativeBuildInputs = [ pkg-config ];
diff --git a/nixpkgs/pkgs/servers/sql/postgresql/ext/plpgsql_check.nix b/nixpkgs/pkgs/servers/sql/postgresql/ext/plpgsql_check.nix
index 3d3461dbd0c0..db1199b20d77 100644
--- a/nixpkgs/pkgs/servers/sql/postgresql/ext/plpgsql_check.nix
+++ b/nixpkgs/pkgs/servers/sql/postgresql/ext/plpgsql_check.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "plpgsql-check";
-  version = "2.7.1";
+  version = "2.7.2";
 
   src = fetchFromGitHub {
     owner = "okbob";
     repo = "plpgsql_check";
     rev = "v${version}";
-    hash = "sha256-2SOBisIElNqqg5NwFk+pp7sE/+OvTifJUKMWOaOvO3k=";
+    hash = "sha256-7CHKcUpqEXJ+z0OcxrEpYHaO/zUtRbCXa8LgL+/roSg=";
   };
 
   buildInputs = [ postgresql ];
diff --git a/nixpkgs/pkgs/servers/sql/postgresql/ext/timescaledb.nix b/nixpkgs/pkgs/servers/sql/postgresql/ext/timescaledb.nix
index dac2e77c0cf2..912bca925d80 100644
--- a/nixpkgs/pkgs/servers/sql/postgresql/ext/timescaledb.nix
+++ b/nixpkgs/pkgs/servers/sql/postgresql/ext/timescaledb.nix
@@ -2,7 +2,7 @@
 
 stdenv.mkDerivation rec {
   pname = "timescaledb${lib.optionalString (!enableUnfree) "-apache"}";
-  version = "2.13.0";
+  version = "2.13.1";
 
   nativeBuildInputs = [ cmake ];
   buildInputs = [ postgresql openssl libkrb5 ];
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
     owner = "timescale";
     repo = "timescaledb";
     rev = version;
-    hash = "sha256-ZF3VNiTfuxCMVMRv9fqBssXuikxKbwza6ib7IuXYjgA=";
+    hash = "sha256-7OMeH818f/wu55jQS/6pP+hl7ph2Ul5LiLrSDA47SeM=";
   };
 
   cmakeFlags = [ "-DSEND_TELEMETRY_DEFAULT=OFF" "-DREGRESS_CHECKS=OFF" "-DTAP_CHECKS=OFF" ]
diff --git a/nixpkgs/pkgs/servers/sql/postgresql/patches/libxml2.12-15.patch b/nixpkgs/pkgs/servers/sql/postgresql/patches/libxml2.12-15.patch
new file mode 100644
index 000000000000..13438c7d4bb7
--- /dev/null
+++ b/nixpkgs/pkgs/servers/sql/postgresql/patches/libxml2.12-15.patch
@@ -0,0 +1,22 @@
+diff --git a/src/backend/utils/adt/xml.c b/src/backend/utils/adt/xml.c
+index 6411f56b998..0eb39fcfc26 100644
+--- a/src/backend/utils/adt/xml.c
++++ b/src/backend/utils/adt/xml.c
+@@ -119,7 +119,7 @@ struct PgXmlErrorContext
+ 
+ static xmlParserInputPtr xmlPgEntityLoader(const char *URL, const char *ID,
+ 										   xmlParserCtxtPtr ctxt);
+-static void xml_errorHandler(void *data, xmlErrorPtr error);
++static void xml_errorHandler(void *data, const xmlError *error);
+ static void xml_ereport_by_code(int level, int sqlcode,
+ 								const char *msg, int errcode);
+ static void chopStringInfoNewlines(StringInfo str);
+@@ -1749,7 +1749,7 @@ xml_ereport(PgXmlErrorContext *errcxt, int level, int sqlcode, const char *msg)
+  * Error handler for libxml errors and warnings
+  */
+ static void
+-xml_errorHandler(void *data, xmlErrorPtr error)
++xml_errorHandler(void *data, const xmlError *error)
+ {
+ 	PgXmlErrorContext *xmlerrcxt = (PgXmlErrorContext *) data;
+ 	xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) error->ctxt;