about summary refs log tree commit diff
path: root/pkgs/development/interpreters
diff options
context:
space:
mode:
authorIzorkin <izorkin@elven.pw>2018-12-10 10:25:31 +0300
committerFranz Pletz <fpletz@fnordicwalking.de>2018-12-11 20:11:11 +0100
commitb5137de3792f20457e98e9866316178a4189f00a (patch)
tree8a62f857ba215eae0d4825568a9a6e36406a29ec /pkgs/development/interpreters
parentf80e7df14319207d6fa2554a27ad8bdf7f68079a (diff)
downloadnixlib-b5137de3792f20457e98e9866316178a4189f00a.tar
nixlib-b5137de3792f20457e98e9866316178a4189f00a.tar.gz
nixlib-b5137de3792f20457e98e9866316178a4189f00a.tar.bz2
nixlib-b5137de3792f20457e98e9866316178a4189f00a.tar.lz
nixlib-b5137de3792f20457e98e9866316178a4189f00a.tar.xz
nixlib-b5137de3792f20457e98e9866316178a4189f00a.tar.zst
nixlib-b5137de3792f20457e98e9866316178a4189f00a.zip
php: add custom options
Diffstat (limited to 'pkgs/development/interpreters')
-rw-r--r--pkgs/development/interpreters/php/default.nix12
1 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/development/interpreters/php/default.nix b/pkgs/development/interpreters/php/default.nix
index d28f70d8ae23..b773963b981f 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
       '';