From 4ef269528491cab88d8b25b8957df28d6e087e94 Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Mon, 4 Dec 2017 12:56:33 +0100 Subject: [PATCH 1/3] php: Init at 7.2.0 --- pkgs/development/interpreters/php/default.nix | 13 ++++++++++++- pkgs/top-level/all-packages.nix | 3 ++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/php/default.nix b/pkgs/development/interpreters/php/default.nix index db4eb6eaee0c..8bfc01ba46c2 100644 --- a/pkgs/development/interpreters/php/default.nix +++ b/pkgs/development/interpreters/php/default.nix @@ -4,7 +4,7 @@ , mysql, libxml2, readline, zlib, curl, postgresql, gettext , openssl, pcre, pkgconfig, sqlite, config, libjpeg, libpng, freetype , libxslt, libmcrypt, bzip2, icu, openldap, cyrus_sasl, libmhash, freetds -, uwimap, pam, gmp, apacheHttpd, libiconv, systemd }: +, uwimap, pam, gmp, apacheHttpd, libiconv, systemd, libsodium }: let @@ -226,6 +226,11 @@ let calendar = { configureFlags = ["--enable-calendar"]; }; + + sodium = { + configureFlags = ["--with-sodium=${libsodium.dev}"]; + buildInputs = [libsodium]; + }; }; cfg = { @@ -265,6 +270,7 @@ let mssqlSupport = (!php7) && (config.php.mssql or (!stdenv.isDarwin)); ztsSupport = config.php.zts or false; calendarSupport = config.php.calendar or true; + sodiumSupport = (lib.versionAtLeast version "7.2") && config.php.sodium or true; }; hardeningDisable = [ "bindnow" ]; @@ -346,4 +352,9 @@ in { version = "7.1.11"; sha256 = "0ww5493w8w3jlks0xqlfm3v6mm53vpnv5vjy63inkj8zf3gdfikn"; }; + + php72 = generic { + version = "7.2.0"; + sha256 = "0jn642bm4ah6a5cjavpz8mzw3ddxa270fcwxkj3rg6vb4bjgmzib"; + }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 668fba30a960..98518797f0e2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6773,7 +6773,8 @@ with pkgs; inherit (callPackages ../development/interpreters/php { }) php56 php70 - php71; + php71 + php72; php-embed = php71-embed; From a3edbc13991a9b1a62ad324c63e5539c9edf7773 Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Tue, 5 Dec 2017 22:08:02 +0100 Subject: [PATCH 2/3] phpPackages: Init at php72Packages --- pkgs/top-level/all-packages.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 98518797f0e2..c77658244dfc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6770,6 +6770,11 @@ with pkgs; php = php71; }); + php72Packages = recurseIntoAttrs (callPackage ./php-packages.nix { + php = php72; + }); + + inherit (callPackages ../development/interpreters/php { }) php56 php70 From f1779cec242a6bf540218606636c71dd680afcf8 Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Mon, 1 Jan 2018 18:23:27 +0100 Subject: [PATCH 3/3] php72Packages.xdebug: Init at 2.6.0beta1 Earlier versions doesn't work with PHP 7.2. --- pkgs/top-level/php-packages.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix index 5af4b6f0c092..d297496c81ef 100644 --- a/pkgs/top-level/php-packages.nix +++ b/pkgs/top-level/php-packages.nix @@ -8,6 +8,8 @@ let }; isPhpOlder55 = pkgs.lib.versionOlder php.version "5.5"; 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; @@ -179,7 +181,7 @@ let 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 { name = "xdebug-2.3.1"; @@ -190,7 +192,7 @@ let checkTarget = "test"; }; - xdebug25 = buildPecl { + xdebug25 = assert !isPhp72; buildPecl { name = "xdebug-2.5.0"; sha256 = "03c9y25a3gc3kpav0cdgmhjixcaly6974hx7wgihi0wlchgavmlb"; @@ -199,6 +201,15 @@ let checkTarget = "test"; }; + xdebug26 = assert !isPhpOlder7; buildPecl { + name = "xdebug-2.6.0beta1"; + + sha256 = "0zaj821jbpaqqcbr9a64sa27my9n980pmyy9kxrvvjqq3qg6dpj9"; + + doCheck = true; + checkTarget = "test"; + }; + yaml = if isPhp7 then yaml20 else yaml13; yaml13 = assert !isPhp7; buildPecl {