git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #8871 from mayflower/php7-beta1

php70: init at 7.0beta1

commit22d5d780277b8964107830ec98aceb4fede30d4a authorAustin Seipp <aseipp@pobox.com> dateSun 19 Jul 2015, 16:57 (11 years ago) parent6475be25e7850f
4 files changed+47−6
pkgs/development/interpreters/php/7.0.nix+8 pkgs/development/interpreters/php/fix-paths-php7.patch+23 pkgs/development/interpreters/php/generic.nix+14−6 pkgs/top-level/all-packages.nix+2
pkgs/development/interpreters/php/7.0.nixnew file+8
@@ -0,0 +1,8 @@
1+{ callPackage, apacheHttpd }:
2+callPackage ./generic.nix {
3+ phpVersion = "7.0.0beta1";
4+ url = "https://downloads.php.net/~ab/php-7.0.0beta1.tar.bz2";
5+ sha = "1pj3ysfhswg2r370ivp33fv9zbcl3yvhmxgnc731k08hv6hmd984";
6+ apacheHttpd = apacheHttpd;
7+ php7 = true;
8+}
pkgs/development/interpreters/php/fix-paths-php7.patchnew file+23
@@ -0,0 +1,23 @@
1+--- php-7.0.0beta1/configure 2015-07-10 12:11:41.810045613 +0000
2++++ php-7.0.0beta1-new/configure 2015-07-17 16:10:21.775528267 +0000
3+@@ -6172,7 +6172,7 @@
4+ as_fn_error $? "Please note that Apache version >= 2.0.44 is required" "$LINENO" 5
5+ fi
6+
7+- APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR`
8++ APXS_LIBEXECDIR="$prefix/modules"
9+ if test -z `$APXS -q SYSCONFDIR`; then
10+ INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
11+ $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
12+@@ -37303,9 +37303,7 @@
13+
14+
15+ if test "$PHP_GETTEXT" != "no"; then
16+- for i in $PHP_GETTEXT /usr/local /usr; do
17+- test -r $i/include/libintl.h && GETTEXT_DIR=$i && break
18+- done
19++ GETTEXT_DIR=$PHP_GETTEXT
20+
21+ if test -z "$GETTEXT_DIR"; then
22+ as_fn_error $? "Cannot locate header file libintl.h" "$LINENO" 5
23+
pkgs/development/interpreters/php/generic.nix+14−6
@@ -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})
pkgs/top-level/all-packages.nix+2
@@ -4961,6 +4961,8 @@ let
49614961
49624962 php56 = callPackage ../development/interpreters/php/5.6.nix { };
49634963
4964+ php70 = callPackage ../development/interpreters/php/7.0.nix { };
4965+
49644966 picoc = callPackage ../development/interpreters/picoc {};
49654967
49664968 picolisp = callPackage ../development/interpreters/picolisp {};