From 4855a6f817aea59f6c568bc9e298c899602d17a2 Mon Sep 17 00:00:00 2001 From: Thomas Gerbet Date: Wed, 19 Apr 2023 10:24:02 +0200 Subject: [PATCH 1/2] unit: drop PHP 8.0 support PHP 8.0 will be end-of-life before the end of life of the next stable version of NixOS. Related to #224505. --- pkgs/servers/http/unit/default.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkgs/servers/http/unit/default.nix b/pkgs/servers/http/unit/default.nix index c8178fe87a9d..1860365ce910 100644 --- a/pkgs/servers/http/unit/default.nix +++ b/pkgs/servers/http/unit/default.nix @@ -1,7 +1,6 @@ { lib, stdenv, fetchFromGitHub, nixosTests, which , pcre2 , withPython3 ? true, python3, ncurses -, withPHP80 ? false, php80 , withPHP81 ? true, php81 , withPerl534 ? false, perl534 , withPerl536 ? true, perl536 @@ -26,7 +25,6 @@ let fpmSupport = false; }; - php80-unit = php80.override phpConfig; php81-unit = php81.override phpConfig; in stdenv.mkDerivation rec { @@ -44,7 +42,6 @@ in stdenv.mkDerivation rec { buildInputs = [ pcre2.dev ] ++ optionals withPython3 [ python3 ncurses ] - ++ optional withPHP80 php80-unit ++ optional withPHP81 php81-unit ++ optional withPerl534 perl534 ++ optional withPerl536 perl536 @@ -64,12 +61,10 @@ in stdenv.mkDerivation rec { ++ optional withDebug "--debug"; # Optionally add the PHP derivations used so they can be addressed in the configs - usedPhp80 = optionals withPHP80 php80-unit; usedPhp81 = optionals withPHP81 php81-unit; postConfigure = '' ${optionalString withPython3 "./configure python --module=python3 --config=python3-config --lib-path=${python3}/lib"} - ${optionalString withPHP80 "./configure php --module=php80 --config=${php80-unit.unwrapped.dev}/bin/php-config --lib-path=${php80-unit}/lib"} ${optionalString withPHP81 "./configure php --module=php81 --config=${php81-unit.unwrapped.dev}/bin/php-config --lib-path=${php81-unit}/lib"} ${optionalString withPerl534 "./configure perl --module=perl534 --perl=${perl534}/bin/perl"} ${optionalString withPerl536 "./configure perl --module=perl536 --perl=${perl536}/bin/perl"} From 9817e6af859354ca10979fd7e47c0d94d13ec5da Mon Sep 17 00:00:00 2001 From: Thomas Gerbet Date: Wed, 19 Apr 2023 10:36:33 +0200 Subject: [PATCH 2/2] unit: add PHP 8.2 support --- pkgs/servers/http/unit/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/servers/http/unit/default.nix b/pkgs/servers/http/unit/default.nix index 1860365ce910..68ac3d7f2cd5 100644 --- a/pkgs/servers/http/unit/default.nix +++ b/pkgs/servers/http/unit/default.nix @@ -2,6 +2,7 @@ , pcre2 , withPython3 ? true, python3, ncurses , withPHP81 ? true, php81 +, withPHP82 ? false, php82 , withPerl534 ? false, perl534 , withPerl536 ? true, perl536 , withPerldevel ? false, perldevel @@ -26,6 +27,7 @@ let }; php81-unit = php81.override phpConfig; + php82-unit = php82.override phpConfig; in stdenv.mkDerivation rec { version = "1.29.1"; @@ -43,6 +45,7 @@ in stdenv.mkDerivation rec { buildInputs = [ pcre2.dev ] ++ optionals withPython3 [ python3 ncurses ] ++ optional withPHP81 php81-unit + ++ optional withPHP82 php82-unit ++ optional withPerl534 perl534 ++ optional withPerl536 perl536 ++ optional withPerldevel perldevel @@ -66,6 +69,7 @@ in stdenv.mkDerivation rec { postConfigure = '' ${optionalString withPython3 "./configure python --module=python3 --config=python3-config --lib-path=${python3}/lib"} ${optionalString withPHP81 "./configure php --module=php81 --config=${php81-unit.unwrapped.dev}/bin/php-config --lib-path=${php81-unit}/lib"} + ${optionalString withPHP82 "./configure php --module=php81 --config=${php82-unit.unwrapped.dev}/bin/php-config --lib-path=${php82-unit}/lib"} ${optionalString withPerl534 "./configure perl --module=perl534 --perl=${perl534}/bin/perl"} ${optionalString withPerl536 "./configure perl --module=perl536 --perl=${perl536}/bin/perl"} ${optionalString withPerldevel "./configure perl --module=perldev --perl=${perldevel}/bin/perl"}