summary refs log tree commit diff
path: root/pkgs/development/interpreters/php/default.nix
diff options
context:
space:
mode:
authorIzorkin <izorkin@elven.pw>2019-03-10 15:37:59 +0300
committerIzorkin <izorkin@elven.pw>2019-03-10 15:43:45 +0300
commit799f9004a9609bb5dc260d24287e7814e2ea024e (patch)
tree8ee70bcbe457f3830d46ce445157a069f6768c91 /pkgs/development/interpreters/php/default.nix
parentc103b5b236019323ab0df03b7e5a45f86dc2542e (diff)
downloadnixpkgs-799f9004a9609bb5dc260d24287e7814e2ea024e.tar
nixpkgs-799f9004a9609bb5dc260d24287e7814e2ea024e.tar.gz
nixpkgs-799f9004a9609bb5dc260d24287e7814e2ea024e.tar.bz2
nixpkgs-799f9004a9609bb5dc260d24287e7814e2ea024e.tar.lz
nixpkgs-799f9004a9609bb5dc260d24287e7814e2ea024e.tar.xz
nixpkgs-799f9004a9609bb5dc260d24287e7814e2ea024e.tar.zst
nixpkgs-799f9004a9609bb5dc260d24287e7814e2ea024e.zip
php: add custom options
Diffstat (limited to 'pkgs/development/interpreters/php/default.nix')
-rw-r--r--pkgs/development/interpreters/php/default.nix18
1 files changed, 14 insertions, 4 deletions
diff --git a/pkgs/development/interpreters/php/default.nix b/pkgs/development/interpreters/php/default.nix
index d26ad077c14..813c8dd7c8b 100644
--- a/pkgs/development/interpreters/php/default.nix
+++ b/pkgs/development/interpreters/php/default.nix
@@ -3,7 +3,8 @@
 , mysql, libxml2, readline, zlib, curl, postgresql, gettext
 , openssl, pcre, pcre2, pkgconfig, sqlite, config, libjpeg, libpng, freetype
 , libxslt, libmcrypt, bzip2, icu, openldap, cyrus_sasl, libmhash, unixODBC
-, uwimap, pam, gmp, apacheHttpd, libiconv, systemd, libsodium, html-tidy, libargon2, libzip
+, uwimap, pam, gmp, apacheHttpd, libiconv, systemd, libsodium, html-tidy, libargon2
+, libzip, re2c, valgrind
 }:
 
 with lib;
@@ -52,12 +53,16 @@ let
   , sodiumSupport ? (config.php.sodium or true) && (versionAtLeast version "7.2")
   , 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")
+  , libzipSupport ? (config.php.libzip or true) && (versionAtLeast version "7.2")
   , phpdbgSupport ? config.php.phpdbg or true
   , cgiSupport ? config.php.cgi or true
   , cliSupport ? config.php.cli or true
   , pharSupport ? config.php.phar or true
   , xmlrpcSupport ? (config.php.xmlrpc or false) && (libxml2Support)
+  , re2cSupport ? config.php.re2c or true
+  , cgotoSupport ? (config.php.cgoto or false) && (re2cSupport)
+  , valgrindSupport ? (config.php.valgrind or true) && (versionAtLeast version "7.2")
+  , valgrindPcreSupport ? (config.php.valgrindPcreSupport or false) && (valgrindSupport) && (versionAtLeast version "7.2")
   }:
 
     let
@@ -102,7 +107,9 @@ let
         ++ optional sodiumSupport libsodium
         ++ optional tidySupport html-tidy
         ++ optional argon2Support libargon2
-        ++ optional libzipSupport libzip;
+        ++ optional libzipSupport libzip
+        ++ optional re2cSupport re2c
+        ++ optional valgrindSupport valgrind;
 
       CXXFLAGS = optional stdenv.cc.isClang "-std=c++11";
 
@@ -183,7 +190,10 @@ let
       ++ optional (!cgiSupport) "--disable-cgi"
       ++ optional (!cliSupport) "--disable-cli"
       ++ optional (!pharSupport) "--disable-phar"
-      ++ optional xmlrpcSupport "--with-xmlrpc";
+      ++ optional xmlrpcSupport "--with-xmlrpc"
+      ++ optional cgotoSupport "--enable-re2c-cgoto"
+      ++ optional valgrindSupport "--with-valgrind=${valgrind.dev}"
+      ++ optional valgrindPcreSupport "--with-pcre-valgrind";
 
       hardeningDisable = [ "bindnow" ];