From 3e601e54555b6e77d686ef9e5958d8bce5f0802e Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Mon, 10 Nov 2025 03:57:40 +0100 Subject: [PATCH] php: Enable ACL support for FPM This will allow authorizing extra processes like Prometheus exporter without having to run it as `listen.user` (or adding it `listen.group` and changing `listen.mode` to `0660`). It is disabled by default: https://www.php.net/manual/en/install.fpm.install.php but it has been available since PHP 5.6: https://github.com/php/php-src/commit/744ada7d9ddb7c0f37c494bf0e7636cb1ed6cb34 And Debian enables it too: https://salsa.debian.org/php-team/php/-/commit/153055e5e35b4e8fce0fc452d2052e5457242abd --- pkgs/development/interpreters/php/generic.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/php/generic.nix b/pkgs/development/interpreters/php/generic.nix index 0279576ce299..849ea239eff3 100644 --- a/pkgs/development/interpreters/php/generic.nix +++ b/pkgs/development/interpreters/php/generic.nix @@ -13,6 +13,7 @@ let makeBinaryWrapper, symlinkJoin, writeText, + acl, autoconf, automake, bison, @@ -248,6 +249,7 @@ let # Enable sapis ++ lib.optionals pearSupport [ libxml2.dev ] + ++ lib.optionals (fpmSupport && stdenv.hostPlatform.isLinux) [ acl ] # Misc deps ++ lib.optional apxs2Support apacheHttpd @@ -268,7 +270,10 @@ let # Enable sapis ++ lib.optional (!cgiSupport) "--disable-cgi" ++ lib.optional (!cliSupport) "--disable-cli" - ++ lib.optional fpmSupport "--enable-fpm" + ++ lib.optionals fpmSupport [ + "--enable-fpm" + (lib.withFeature stdenv.hostPlatform.isLinux "fpm-acl") + ] ++ lib.optionals pearSupport [ "--with-pear" "--enable-xml"