From 6be7d1c176b80d8fb4e7e0b4c699cbd300d8ef61 Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Mon, 10 Aug 2020 19:47:23 +0200 Subject: [PATCH] php: Drop PHP 7.2 support --- nixos/doc/manual/release-notes/rl-2009.xml | 5 ++ pkgs/development/interpreters/php/default.nix | 11 +--- .../php/php72-darwin-isfinite.patch | 62 ------------------- pkgs/servers/http/unit/default.nix | 5 -- pkgs/top-level/aliases.nix | 4 -- pkgs/top-level/all-packages.nix | 4 +- 6 files changed, 7 insertions(+), 84 deletions(-) delete mode 100644 pkgs/development/interpreters/php/php72-darwin-isfinite.patch diff --git a/nixos/doc/manual/release-notes/rl-2009.xml b/nixos/doc/manual/release-notes/rl-2009.xml index 5009ef4d873b..1ca5821d68fe 100644 --- a/nixos/doc/manual/release-notes/rl-2009.xml +++ b/nixos/doc/manual/release-notes/rl-2009.xml @@ -42,6 +42,11 @@ PHP now defaults to PHP 7.4, updated from 7.3. + + + PHP 7.2 is no longer supported due to upstream not supporting this version for the entire lifecycle of the 20.09 release. + + Python 3 now defaults to Python 3.8 instead of 3.7. diff --git a/pkgs/development/interpreters/php/default.nix b/pkgs/development/interpreters/php/default.nix index 6e11b02611f3..53d435ebb82e 100644 --- a/pkgs/development/interpreters/php/default.nix +++ b/pkgs/development/interpreters/php/default.nix @@ -267,14 +267,6 @@ let }; }; - php72base = callPackage generic (_args // { - version = "7.2.32"; - sha256 = "19wqbpvsd6c6iaad00h0m0xnx4r8fj56pwfhki2cw5xdfi10lp3i"; - - # https://bugs.php.net/bug.php?id=76826 - extraPatches = lib.optional stdenv.isDarwin ./php72-darwin-isfinite.patch; - }); - php73base = callPackage generic (_args // { version = "7.3.20"; sha256 = "1pl9bjwvdva2yx4sh465z9cr4bnr8mvv008w71sy1kqsj6a7ivf6"; @@ -301,8 +293,7 @@ let php74 = php74base.withExtensions defaultPhpExtensions; php73 = php73base.withExtensions defaultPhpExtensionsWithHash; - php72 = php72base.withExtensions defaultPhpExtensionsWithHash; in { - inherit php72 php73 php74; + inherit php73 php74; } diff --git a/pkgs/development/interpreters/php/php72-darwin-isfinite.patch b/pkgs/development/interpreters/php/php72-darwin-isfinite.patch deleted file mode 100644 index ea2e3e28f2cc..000000000000 --- a/pkgs/development/interpreters/php/php72-darwin-isfinite.patch +++ /dev/null @@ -1,62 +0,0 @@ -diff --git a/Zend/configure.ac b/Zend/configure.ac -index b95c1360b8..fe16c86007 100644 ---- a/Zend/configure.ac -+++ b/Zend/configure.ac -@@ -60,7 +60,7 @@ int zend_sprintf(char *buffer, const char *format, ...); - #include - - #ifndef zend_isnan --#if HAVE_DECL_ISNAN && (!defined(__cplusplus) || __cplusplus < 201103L) -+#if HAVE_DECL_ISNAN && (defined(__APPLE__) || defined(__APPLE_CC__) || !defined(__cplusplus) || __cplusplus < 201103L) - #define zend_isnan(a) isnan(a) - #elif defined(HAVE_FPCLASS) - #define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN)) -@@ -69,7 +69,7 @@ int zend_sprintf(char *buffer, const char *format, ...); - #endif - #endif - --#if HAVE_DECL_ISINF && (!defined(__cplusplus) || __cplusplus < 201103L) -+#if HAVE_DECL_ISINF && (defined(__APPLE__) || defined(__APPLE_CC__) || !defined(__cplusplus) || __cplusplus < 201103L) - #define zend_isinf(a) isinf(a) - #elif defined(INFINITY) - /* Might not work, but is required by ISO C99 */ -@@ -80,7 +80,7 @@ int zend_sprintf(char *buffer, const char *format, ...); - #define zend_isinf(a) 0 - #endif - --#if HAVE_DECL_ISFINITE && (!defined(__cplusplus) || __cplusplus < 201103L) -+#if HAVE_DECL_ISFINITE && (defined(__APPLE__) || defined(__APPLE_CC__) || !defined(__cplusplus) || __cplusplus < 201103L) - #define zend_finite(a) isfinite(a) - #elif defined(HAVE_FINITE) - #define zend_finite(a) finite(a) -diff --git a/configure.ac b/configure.ac -index d3f3cacd07..ddbf712ba2 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -68,7 +68,7 @@ int zend_sprintf(char *buffer, const char *format, ...); - #include - - #ifndef zend_isnan --#if HAVE_DECL_ISNAN && (!defined(__cplusplus) || __cplusplus < 201103L) -+#if HAVE_DECL_ISNAN && (defined(__APPLE__) || defined(__APPLE_CC__) || !defined(__cplusplus) || __cplusplus < 201103L) - #define zend_isnan(a) isnan(a) - #elif defined(HAVE_FPCLASS) - #define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN)) -@@ -77,7 +77,7 @@ int zend_sprintf(char *buffer, const char *format, ...); - #endif - #endif - --#if HAVE_DECL_ISINF && (!defined(__cplusplus) || __cplusplus < 201103L) -+#if HAVE_DECL_ISINF && (defined(__APPLE__) || defined(__APPLE_CC__) || !defined(__cplusplus) || __cplusplus < 201103L) - #define zend_isinf(a) isinf(a) - #elif defined(INFINITY) - /* Might not work, but is required by ISO C99 */ -@@ -88,7 +88,7 @@ int zend_sprintf(char *buffer, const char *format, ...); - #define zend_isinf(a) 0 - #endif - --#if HAVE_DECL_ISFINITE && (!defined(__cplusplus) || __cplusplus < 201103L) -+#if HAVE_DECL_ISFINITE && (defined(__APPLE__) || defined(__APPLE_CC__) || !defined(__cplusplus) || __cplusplus < 201103L) - #define zend_finite(a) isfinite(a) - #elif defined(HAVE_FINITE) - #define zend_finite(a) finite(a) diff --git a/pkgs/servers/http/unit/default.nix b/pkgs/servers/http/unit/default.nix index fbb7768dcbae..913ed201f48e 100644 --- a/pkgs/servers/http/unit/default.nix +++ b/pkgs/servers/http/unit/default.nix @@ -1,7 +1,6 @@ { stdenv, fetchFromGitHub, nixosTests, which , withPython2 ? false, python2 , withPython3 ? true, python3, ncurses -, withPHP72 ? false, php72 , withPHP73 ? false, php73 , withPHP74 ? true, php74 , withPerl528 ? false, perl528 @@ -27,7 +26,6 @@ let fpmSupport = false; }; - php72-unit = php72.override phpConfig; php73-unit = php73.override phpConfig; php74-unit = php74.override phpConfig; @@ -47,7 +45,6 @@ in stdenv.mkDerivation rec { buildInputs = [ ] ++ optional withPython2 python2 ++ optionals withPython3 [ python3 ncurses ] - ++ optional withPHP72 php72-unit ++ optional withPHP73 php73-unit ++ optional withPHP74 php74-unit ++ optional withPerl528 perl528 @@ -68,14 +65,12 @@ in stdenv.mkDerivation rec { ++ optional withDebug "--debug"; # Optionally add the PHP derivations used so they can be addressed in the configs - usedPhp72 = optionals withPHP72 php72-unit; usedPhp73 = optionals withPHP73 php73-unit; usedPhp74 = optionals withPHP74 php74-unit; postConfigure = '' ${optionalString withPython2 "./configure python --module=python2 --config=python2-config --lib-path=${python2}/lib"} ${optionalString withPython3 "./configure python --module=python3 --config=python3-config --lib-path=${python3}/lib"} - ${optionalString withPHP72 "./configure php --module=php72 --config=${php72-unit.unwrapped.dev}/bin/php-config --lib-path=${php72-unit}/lib"} ${optionalString withPHP73 "./configure php --module=php73 --config=${php73-unit.unwrapped.dev}/bin/php-config --lib-path=${php73-unit}/lib"} ${optionalString withPHP74 "./configure php --module=php74 --config=${php74-unit.unwrapped.dev}/bin/php-config --lib-path=${php74-unit}/lib"} ${optionalString withPerl528 "./configure perl --module=perl528 --perl=${perl528}/bin/perl"} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 64c2d6f369e3..3d2c21cc3586 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -348,7 +348,6 @@ mapAliases ({ with the following snippet: php74.override { embedSupport = true; apxs2Support = false; } ''; # added 2020-04-01 - php72-embed = php-embed; # added 2020-04-01 php73-embed = php-embed; # added 2020-04-01 php74-embed = php-embed; # added 2020-04-01 @@ -359,7 +358,6 @@ mapAliases ({ ''; # added 2020-04-01 php74Packages-embed = phpPackages-embed; php73Packages-embed = phpPackages-embed; - php72Packages-embed = phpPackages-embed; php-unit = throw '' php*-unit has been dropped, you can build something similar with @@ -373,7 +371,6 @@ mapAliases ({ fpmSupport = false; } ''; # added 2020-04-01 - php72-unit = php-unit; # added 2020-04-01 php73-unit = php-unit; # added 2020-04-01 php74-unit = php-unit; # added 2020-04-01 @@ -391,7 +388,6 @@ mapAliases ({ ''; # added 2020-04-01 php74Packages-unit = phpPackages-unit; php73Packages-unit = phpPackages-unit; - php72Packages-unit = phpPackages-unit; pidgin-with-plugins = pidgin; # added 2016-06 pidginlatex = pidgin-latex; # added 2018-01-08 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e6d9578b9c52..1e7579fc137d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9866,18 +9866,16 @@ in php = php74; phpPackages = php74Packages; - php72Packages = recurseIntoAttrs php72.packages; php73Packages = recurseIntoAttrs php73.packages; php74Packages = recurseIntoAttrs php74.packages; phpExtensions = php74Extensions; - php72Extensions = recurseIntoAttrs php72.extensions; php73Extensions = recurseIntoAttrs php73.extensions; php74Extensions = recurseIntoAttrs php74.extensions; inherit (callPackage ../development/interpreters/php { stdenv = if stdenv.cc.isClang then llvmPackages_6.stdenv else stdenv; - }) php74 php73 php72; + }) php74 php73; picoc = callPackage ../development/interpreters/picoc {};