postgresql: add ldapSupport option

This commit is contained in:
Wolfgang Walther
2024-11-23 17:11:59 +01:00
parent 53c64f04a7
commit 1d6870f81e
+8 -2
View File
@@ -59,6 +59,10 @@ let
, nukeReferences
, overrideCC
# LDAP
, ldapSupport ? false
, openldap
# PAM
, pamSupport ? stdenv.hostPlatform.isLinux
, linux-pam
@@ -145,7 +149,8 @@ let
++ lib.optionals pythonSupport [ python3 ]
++ lib.optionals gssSupport [ libkrb5 ]
++ lib.optionals pamSupport [ linux-pam ]
++ lib.optionals perlSupport [ perl ];
++ lib.optionals perlSupport [ perl ]
++ lib.optionals ldapSupport [ openldap ];
nativeBuildInputs = [
makeWrapper
@@ -187,7 +192,8 @@ let
# This could be removed once the upstream issue is resolved:
# https://postgr.es/m/flat/427c7c25-e8e1-4fc5-a1fb-01ceff185e5b%40technowledgy.de
++ lib.optionals (stdenv'.hostPlatform.isDarwin && atLeast "16") [ "LDFLAGS_EX_BE=-Wl,-export_dynamic" ]
++ lib.optionals (atLeast "17" && !perlSupport) [ "--without-perl" ];
++ lib.optionals (atLeast "17" && !perlSupport) [ "--without-perl" ]
++ lib.optionals ldapSupport [ "--with-ldap" ];
patches = [
(if atLeast "16" then ./patches/relative-to-symlinks-16+.patch else ./patches/relative-to-symlinks.patch)