php: add custom options

This commit is contained in:
Izorkin 2018-12-10 10:25:31 +03:00 committed by Franz Pletz
parent f80e7df143
commit b5137de379
No known key found for this signature in database
GPG Key ID: 846FDED7792617B4

View File

@ -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
'';