From 1d6870f81e420bd7e54c73ecee22164236bd799a Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Fri, 22 Nov 2024 19:33:46 +0100 Subject: [PATCH] postgresql: add ldapSupport option --- pkgs/servers/sql/postgresql/generic.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/sql/postgresql/generic.nix b/pkgs/servers/sql/postgresql/generic.nix index bb2a32a32bbe..a8d211285156 100644 --- a/pkgs/servers/sql/postgresql/generic.nix +++ b/pkgs/servers/sql/postgresql/generic.nix @@ -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)