From 6bafc8f578c900d5cb168193e8f0bb9fa68121cb Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Fri, 22 Nov 2024 19:19:43 +0100 Subject: [PATCH] postgresql: make PAM optional --- pkgs/servers/sql/postgresql/generic.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/sql/postgresql/generic.nix b/pkgs/servers/sql/postgresql/generic.nix index 4941ac4c2991..c5018c5a9259 100644 --- a/pkgs/servers/sql/postgresql/generic.nix +++ b/pkgs/servers/sql/postgresql/generic.nix @@ -20,7 +20,6 @@ let , icu , libuuid , libxml2 - , linux-pam , lz4 , openssl , readline @@ -58,6 +57,10 @@ let , nukeReferences , overrideCC + # PAM + , pamSupport ? stdenv.hostPlatform.isLinux + , linux-pam + # PL/Python , pythonSupport ? false , python3 @@ -135,7 +138,7 @@ let ++ lib.optionals systemdSupport [ systemdLibs ] ++ lib.optionals pythonSupport [ python3 ] ++ lib.optionals gssSupport [ libkrb5 ] - ++ lib.optionals stdenv'.hostPlatform.isLinux [ linux-pam ]; + ++ lib.optionals pamSupport [ linux-pam ]; nativeBuildInputs = [ makeWrapper @@ -173,7 +176,7 @@ let ++ lib.optionals gssSupport [ "--with-gssapi" ] ++ lib.optionals pythonSupport [ "--with-python" ] ++ lib.optionals jitSupport [ "--with-llvm" ] - ++ lib.optionals stdenv'.hostPlatform.isLinux [ "--with-pam" ] + ++ lib.optionals pamSupport [ "--with-pam" ] # 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" ]