aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/servers/http/unit/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/servers/http/unit/default.nix')
-rw-r--r--nixpkgs/pkgs/servers/http/unit/default.nix42
1 files changed, 22 insertions, 20 deletions
diff --git a/nixpkgs/pkgs/servers/http/unit/default.nix b/nixpkgs/pkgs/servers/http/unit/default.nix
index 1e3ddb4ad8f..c161566d329 100644
--- a/nixpkgs/pkgs/servers/http/unit/default.nix
+++ b/nixpkgs/pkgs/servers/http/unit/default.nix
@@ -1,8 +1,9 @@
-{ stdenv, fetchFromGitHub, which
+{ stdenv, fetchFromGitHub, nixosTests, which
, withPython2 ? false, python2
, withPython3 ? true, python3, ncurses
-, withPHP72 ? false, php72base
-, withPHP73 ? true, php73base
+, withPHP72 ? false, php72
+, withPHP73 ? false, php73
+, withPHP74 ? true, php74
, withPerl528 ? false, perl528
, withPerl530 ? true, perl530
, withPerldevel ? false, perldevel
@@ -18,32 +19,29 @@ with stdenv.lib;
let
phpConfig = {
- config.php.embed = true;
- config.php.apxs2 = false;
- config.php.systemd = false;
- config.php.phpdbg = false;
- config.php.cgi = false;
- config.php.fpm = false;
+ embedSupport = true;
+ apxs2Support = false;
+ systemdSupport = false;
+ phpdbgSupport = false;
+ cgiSupport = false;
+ fpmSupport = false;
};
- php72-unit = php72base.override phpConfig;
- php73-unit = php73base.override phpConfig;
+ php72-unit = php72.override phpConfig;
+ php73-unit = php73.override phpConfig;
+ php74-unit = php74.override phpConfig;
+
in stdenv.mkDerivation rec {
- version = "1.16.0";
+ version = "1.17.0";
pname = "unit";
src = fetchFromGitHub {
owner = "nginx";
repo = "unit";
rev = version;
- sha256 = "19gclqhwccpi7y4386ap33ycwhylv4s4kwfc6ik8scmc4pw3sj9l";
+ sha256 = "1q3659vw8rxv4fk7ljkjav8ga72sb3arljfxcqw8b080f9hvi7hh";
};
- patches = [
- # https://github.com/nginx/unit/issues/357
- ./drop_cap.patch
- ];
-
nativeBuildInputs = [ which ];
buildInputs = [ ]
@@ -51,6 +49,7 @@ in stdenv.mkDerivation rec {
++ optionals withPython3 [ python3 ncurses ]
++ optional withPHP72 php72-unit
++ optional withPHP73 php73-unit
+ ++ optional withPHP73 php74-unit
++ optional withPerl528 perl528
++ optional withPerl530 perl530
++ optional withPerldevel perldevel
@@ -71,8 +70,9 @@ in stdenv.mkDerivation rec {
postConfigure = ''
${optionalString withPython2 "./configure python --module=python2 --config=${python2}/bin/python2-config --lib-path=${python2}/lib"}
${optionalString withPython3 "./configure python --module=python3 --config=${python3}/bin/python3-config --lib-path=${python3}/lib"}
- ${optionalString withPHP72 "./configure php --module=php72 --config=${php72-unit.dev}/bin/php-config --lib-path=${php72-unit}/lib"}
- ${optionalString withPHP73 "./configure php --module=php73 --config=${php73-unit.dev}/bin/php-config --lib-path=${php73-unit}/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"}
${optionalString withPerl530 "./configure perl --module=perl530 --perl=${perl530}/bin/perl"}
${optionalString withPerldevel "./configure perl --module=perldev --perl=${perldevel}/bin/perl"}
@@ -81,6 +81,8 @@ in stdenv.mkDerivation rec {
${optionalString withRuby_2_7 "./configure ruby --module=ruby27 --ruby=${ruby_2_7}/bin/ruby"}
'';
+ passthru.tests.unit-php = nixosTests.unit-php;
+
meta = {
description = "Dynamic web and application server, designed to run applications in multiple languages.";
homepage = "https://unit.nginx.org/";