From b5137de3792f20457e98e9866316178a4189f00a Mon Sep 17 00:00:00 2001 From: Izorkin Date: Mon, 10 Dec 2018 10:25:31 +0300 Subject: [PATCH] php: add custom options --- pkgs/development/interpreters/php/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/php/default.nix b/pkgs/development/interpreters/php/default.nix index d28f70d8ae2..b773963b981 100644 --- a/pkgs/development/interpreters/php/default.nix +++ b/pkgs/development/interpreters/php/default.nix @@ -55,6 +55,10 @@ let , tidySupport ? (config.php.tidy or false) , argon2Support ? (config.php.argon2 or true) && (versionAtLeast version "7.2") , libzipSupport ? (config.php.libzip or true) && (versionAtLeast version "7.3") + , phpdbgSupport ? config.php.phpdbg or true + , cgiSupport ? config.php.cgi or true + , cliSupport ? config.php.cli or true + , pharSupport ? config.php.phar or true }: let @@ -168,7 +172,12 @@ let ++ optional sodiumSupport "--with-sodium=${libsodium.dev}" ++ optional tidySupport "--with-tidy=${html-tidy}" ++ optional argon2Support "--with-password-argon2=${libargon2}" - ++ optional libzipSupport "--with-libzip=${libzip.dev}"; + ++ optional libzipSupport "--with-libzip=${libzip.dev}" + ++ optional phpdbgSupport "--enable-phpdbg" + ++ optional (!phpdbgSupport) "--disable-phpdbg" + ++ optional (!cgiSupport) "--disable-cgi" + ++ optional (!cliSupport) "--disable-cli" + ++ optional (!pharSupport) "--disable-phar"; hardeningDisable = [ "bindnow" ]; @@ -193,6 +202,7 @@ let ''; postInstall = '' + test -d $out/etc || mkdir $out/etc cp php.ini-production $out/etc/php.ini '';