Merge pull request #32305 from etu/php72

php: add 7.2.0
This commit is contained in:
adisbladis 2018-01-01 19:01:02 +01:00 committed by GitHub
commit f59a0f7f1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 32 additions and 4 deletions

View file

@ -4,7 +4,7 @@
, mysql, libxml2, readline, zlib, curl, postgresql, gettext , mysql, libxml2, readline, zlib, curl, postgresql, gettext
, openssl, pcre, pkgconfig, sqlite, config, libjpeg, libpng, freetype , openssl, pcre, pkgconfig, sqlite, config, libjpeg, libpng, freetype
, libxslt, libmcrypt, bzip2, icu, openldap, cyrus_sasl, libmhash, freetds , libxslt, libmcrypt, bzip2, icu, openldap, cyrus_sasl, libmhash, freetds
, uwimap, pam, gmp, apacheHttpd, libiconv, systemd }: , uwimap, pam, gmp, apacheHttpd, libiconv, systemd, libsodium }:
let let
@ -226,6 +226,11 @@ let
calendar = { calendar = {
configureFlags = ["--enable-calendar"]; configureFlags = ["--enable-calendar"];
}; };
sodium = {
configureFlags = ["--with-sodium=${libsodium.dev}"];
buildInputs = [libsodium];
};
}; };
cfg = { cfg = {
@ -265,6 +270,7 @@ let
mssqlSupport = (!php7) && (config.php.mssql or (!stdenv.isDarwin)); mssqlSupport = (!php7) && (config.php.mssql or (!stdenv.isDarwin));
ztsSupport = config.php.zts or false; ztsSupport = config.php.zts or false;
calendarSupport = config.php.calendar or true; calendarSupport = config.php.calendar or true;
sodiumSupport = (lib.versionAtLeast version "7.2") && config.php.sodium or true;
}; };
hardeningDisable = [ "bindnow" ]; hardeningDisable = [ "bindnow" ];
@ -346,4 +352,9 @@ in {
version = "7.1.11"; version = "7.1.11";
sha256 = "0ww5493w8w3jlks0xqlfm3v6mm53vpnv5vjy63inkj8zf3gdfikn"; sha256 = "0ww5493w8w3jlks0xqlfm3v6mm53vpnv5vjy63inkj8zf3gdfikn";
}; };
php72 = generic {
version = "7.2.0";
sha256 = "0jn642bm4ah6a5cjavpz8mzw3ddxa270fcwxkj3rg6vb4bjgmzib";
};
} }

View file

@ -6770,10 +6770,16 @@ with pkgs;
php = php71; php = php71;
}); });
php72Packages = recurseIntoAttrs (callPackage ./php-packages.nix {
php = php72;
});
inherit (callPackages ../development/interpreters/php { }) inherit (callPackages ../development/interpreters/php { })
php56 php56
php70 php70
php71; php71
php72;
php-embed = php71-embed; php-embed = php71-embed;

View file

@ -8,6 +8,8 @@ let
}; };
isPhpOlder55 = pkgs.lib.versionOlder php.version "5.5"; isPhpOlder55 = pkgs.lib.versionOlder php.version "5.5";
isPhp7 = pkgs.lib.versionAtLeast php.version "7.0"; isPhp7 = pkgs.lib.versionAtLeast php.version "7.0";
isPhp72 = pkgs.lib.versionAtLeast php.version "7.2";
isPhpOlder7 = pkgs.lib.versionOlder php.version "7.0";
apcu = if isPhp7 then apcu51 else apcu40; apcu = if isPhp7 then apcu51 else apcu40;
@ -179,7 +181,7 @@ let
buildInputs = [ pkgs.spidermonkey_1_8_5 ]; buildInputs = [ pkgs.spidermonkey_1_8_5 ];
}; };
xdebug = if isPhp7 then xdebug25 else xdebug23; xdebug = if isPhp72 then xdebug26 else if isPhp7 then xdebug25 else xdebug23;
xdebug23 = assert !isPhp7; buildPecl { xdebug23 = assert !isPhp7; buildPecl {
name = "xdebug-2.3.1"; name = "xdebug-2.3.1";
@ -190,7 +192,7 @@ let
checkTarget = "test"; checkTarget = "test";
}; };
xdebug25 = buildPecl { xdebug25 = assert !isPhp72; buildPecl {
name = "xdebug-2.5.0"; name = "xdebug-2.5.0";
sha256 = "03c9y25a3gc3kpav0cdgmhjixcaly6974hx7wgihi0wlchgavmlb"; sha256 = "03c9y25a3gc3kpav0cdgmhjixcaly6974hx7wgihi0wlchgavmlb";
@ -199,6 +201,15 @@ let
checkTarget = "test"; checkTarget = "test";
}; };
xdebug26 = assert !isPhpOlder7; buildPecl {
name = "xdebug-2.6.0beta1";
sha256 = "0zaj821jbpaqqcbr9a64sa27my9n980pmyy9kxrvvjqq3qg6dpj9";
doCheck = true;
checkTarget = "test";
};
yaml = if isPhp7 then yaml20 else yaml13; yaml = if isPhp7 then yaml20 else yaml13;
yaml13 = assert !isPhp7; buildPecl { yaml13 = assert !isPhp7; buildPecl {