postgresql: move explicit libxml2 include behind version flag

This was introduced in #44083 to fix cross building, where xml2-config
wouldn't run on the host platform. This was fixed upstream two years
later [1], so that from v13 on pkg-config is used before xml2-config is.

Once v12 is EOL, we can remove this entirely.

[1]: 0bc8cebdb8
This commit is contained in:
Wolfgang Walther 2024-03-06 19:17:06 +01:00
parent 6c1e2a4401
commit 4adcc41cd9
No known key found for this signature in database
GPG key ID: B39893FA5F65CAE1

View file

@ -88,7 +88,9 @@ let
buildFlags = [ "world" ]; buildFlags = [ "world" ];
env.NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2"; # Makes cross-compiling work when xml2-config can't be executed on the host.
# Fixed upstream in https://github.com/postgres/postgres/commit/0bc8cebdb889368abdf224aeac8bc197fe4c9ae6
env.NIX_CFLAGS_COMPILE = lib.optionalString (olderThan "13") "-I${libxml2.dev}/include/libxml2";
configureFlags = [ configureFlags = [
"--with-openssl" "--with-openssl"