@@ -4,7 +4,8 @@
44, libxslt, libmcrypt, bzip2, icu, openldap, cyrus_sasl, libmhash, freetds
55, uwimap, pam, gmp
66
7−, phpVersion, apacheHttpd, sha }:
7+, phpVersion, apacheHttpd, sha
8+, php7 ? false, url ? null }:
89
910let
1011 libmcryptOverride = libmcrypt.override { disablePosixThreads = true; };
@@ -212,7 +213,7 @@ composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed)
212213 imapSupport = config.php.imap or true;
213214 ldapSupport = config.php.ldap or true;
214215 mhashSupport = config.php.mhash or true;
215− mysqlSupport = config.php.mysql or true;
216+ mysqlSupport = (!php7) && (config.php.mysql or true);
216217 mysqliSupport = config.php.mysqli or true;
217218 pdo_mysqlSupport = config.php.pdo_mysql or true;
218219 libxml2Support = config.php.libxml2 or true;
@@ -220,7 +221,7 @@ composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed)
220221 bcmathSupport = config.php.bcmath or true;
221222 socketsSupport = config.php.sockets or true;
222223 curlSupport = config.php.curl or true;
223− curlWrappersSupport = config.php.curlWrappers or true;
224+ curlWrappersSupport = (!php7) && (config.php.curlWrappers or true);
224225 gettextSupport = config.php.gettext or true;
225226 pcntlSupport = config.php.pcntl or true;
226227 postgresqlSupport = config.php.postgresql or true;
@@ -241,7 +242,7 @@ composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed)
241242 ftpSupport = config.php.ftp or true;
242243 fpmSupport = config.php.fpm or true;
243244 gmpSupport = config.php.gmp or true;
244− mssqlSupport = config.php.mssql or (!stdenv.isDarwin);
245+ mssqlSupport = (!php7) && (config.php.mssql or (!stdenv.isDarwin));
245246 ztsSupport = config.php.zts or false;
246247 calendarSupport = config.php.calendar or true;
247248 };
@@ -267,7 +268,10 @@ composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed)
267268 '';
268269
269270 src = fetchurl {
270− url = "http://www.php.net/distributions/php-${version}.tar.bz2";
271+ url = if url == null then
272+ "http://www.php.net/distributions/php-${version}.tar.bz2"
273+ else
274+ url;
271275 sha256 = sha;
272276 };
273277
@@ -278,6 +282,10 @@ composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed)
278282 maintainers = with maintainers; [ globin ];
279283 };
280284
281− patches = [ ./fix-paths.patch ];
285+ patches = if !php7 then
286+ [ ./fix-paths.patch ]
287+ else
288+ [ ./fix-paths-php7.patch ]
289+ ;
282290
283291})