commit
37293152c7
@ -13,6 +13,7 @@ let
|
|||||||
{ version
|
{ version
|
||||||
, sha256
|
, sha256
|
||||||
, extraPatches ? []
|
, extraPatches ? []
|
||||||
|
, withSystemd ? config.php.systemd or stdenv.isLinux
|
||||||
, imapSupport ? config.php.imap or (!stdenv.isDarwin)
|
, imapSupport ? config.php.imap or (!stdenv.isDarwin)
|
||||||
, ldapSupport ? config.php.ldap or true
|
, ldapSupport ? config.php.ldap or true
|
||||||
, mhashSupport ? config.php.mhash or true
|
, mhashSupport ? config.php.mhash or true
|
||||||
@ -68,7 +69,7 @@ let
|
|||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig autoconf ];
|
nativeBuildInputs = [ pkgconfig autoconf ];
|
||||||
buildInputs = [ flex bison pcre ]
|
buildInputs = [ flex bison pcre ]
|
||||||
++ optional stdenv.isLinux systemd
|
++ optional withSystemd systemd
|
||||||
++ optionals imapSupport [ uwimap openssl pam ]
|
++ optionals imapSupport [ uwimap openssl pam ]
|
||||||
++ optionals curlSupport [ curl openssl ]
|
++ optionals curlSupport [ curl openssl ]
|
||||||
++ optionals ldapSupport [ openldap openssl ]
|
++ optionals ldapSupport [ openldap openssl ]
|
||||||
@ -105,7 +106,7 @@ let
|
|||||||
"--with-pcre-regex=${pcre.dev} PCRE_LIBDIR=${pcre}"
|
"--with-pcre-regex=${pcre.dev} PCRE_LIBDIR=${pcre}"
|
||||||
]
|
]
|
||||||
++ optional stdenv.isDarwin "--with-iconv=${libiconv}"
|
++ optional stdenv.isDarwin "--with-iconv=${libiconv}"
|
||||||
++ optional stdenv.isLinux "--with-fpm-systemd"
|
++ optional withSystemd "--with-fpm-systemd"
|
||||||
++ optionals imapSupport [
|
++ optionals imapSupport [
|
||||||
"--with-imap=${uwimap}"
|
"--with-imap=${uwimap}"
|
||||||
"--with-imap-ssl"
|
"--with-imap-ssl"
|
||||||
|
67
pkgs/servers/http/unit/default.nix
Normal file
67
pkgs/servers/http/unit/default.nix
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
{ stdenv, fetchurl
|
||||||
|
, which
|
||||||
|
, python
|
||||||
|
, php71
|
||||||
|
, php72
|
||||||
|
, perl526
|
||||||
|
, perl
|
||||||
|
, perldevel
|
||||||
|
, ruby_2_3
|
||||||
|
, ruby_2_4
|
||||||
|
, ruby
|
||||||
|
, withSSL ? true, openssl ? null
|
||||||
|
, withIPv6 ? true
|
||||||
|
, withDebug ? false
|
||||||
|
}:
|
||||||
|
|
||||||
|
with stdenv.lib;
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
version = "1.6";
|
||||||
|
name = "unit-${version}";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://unit.nginx.org/download/${name}.tar.gz";
|
||||||
|
sha256 = "0lws5xpzkcmv0gc7vi8pgnymin02dq4gw0zb41jfzq0vbljxxl14";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
which
|
||||||
|
python
|
||||||
|
php71
|
||||||
|
php72
|
||||||
|
perl526
|
||||||
|
perl
|
||||||
|
perldevel
|
||||||
|
ruby_2_3
|
||||||
|
ruby_2_4
|
||||||
|
ruby
|
||||||
|
] ++ optional withSSL openssl;
|
||||||
|
|
||||||
|
configureFlags = [
|
||||||
|
"--control=unix:/run/control.unit.sock"
|
||||||
|
"--pid=/run/unit.pid"
|
||||||
|
] ++ optional withSSL [ "--openssl" ]
|
||||||
|
++ optional (!withIPv6) [ "--no-ipv6" ]
|
||||||
|
++ optional withDebug [ "--debug" ];
|
||||||
|
|
||||||
|
postConfigure = ''
|
||||||
|
./configure python --module=python --config=${python}/bin/python-config --lib-path=${python}/lib
|
||||||
|
./configure php --module=php71 --config=${php71.dev}/bin/php-config --lib-path=${php71}/lib
|
||||||
|
./configure php --module=php72 --config=${php72.dev}/bin/php-config --lib-path=${php72}/lib
|
||||||
|
./configure perl --module=perl526 --perl=${perl526}/bin/perl
|
||||||
|
./configure perl --module=perl --perl=${perl}/bin/perl
|
||||||
|
./configure perl --module=perl529 --perl=${perldevel}/bin/perl
|
||||||
|
./configure ruby --module=ruby23 --ruby=${ruby_2_3}/bin/ruby
|
||||||
|
./configure ruby --module=ruby24 --ruby=${ruby_2_4}/bin/ruby
|
||||||
|
./configure ruby --module=ruby --ruby=${ruby}/bin/ruby
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Dynamic web and application server, designed to run applications in multiple languages.";
|
||||||
|
homepage = https://unit.nginx.org/;
|
||||||
|
license = licenses.asl20;
|
||||||
|
platforms = platforms.linux;
|
||||||
|
maintainers = with maintainers; [ izorkin ];
|
||||||
|
};
|
||||||
|
}
|
@ -7831,6 +7831,14 @@ in
|
|||||||
php = php72;
|
php = php72;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
phpPackages-unit = php72Packages-unit;
|
||||||
|
|
||||||
|
php71Packages-unit = recurseIntoAttrs (callPackage ./php-packages.nix {
|
||||||
|
php = php71-unit;
|
||||||
|
});
|
||||||
|
php72Packages-unit = recurseIntoAttrs (callPackage ./php-packages.nix {
|
||||||
|
php = php72-unit;
|
||||||
|
});
|
||||||
|
|
||||||
inherit (callPackages ../development/interpreters/php { })
|
inherit (callPackages ../development/interpreters/php { })
|
||||||
php71
|
php71
|
||||||
@ -7848,6 +7856,22 @@ in
|
|||||||
config.php.apxs2 = false;
|
config.php.apxs2 = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
php-unit = php72-unit;
|
||||||
|
|
||||||
|
php71-unit = php71.override {
|
||||||
|
config.php.embed = true;
|
||||||
|
config.php.apxs2 = false;
|
||||||
|
config.php.systemd = false;
|
||||||
|
config.php.fpm = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
php72-unit = php72.override {
|
||||||
|
config.php.embed = true;
|
||||||
|
config.php.apxs2 = false;
|
||||||
|
config.php.systemd = false;
|
||||||
|
config.php.fpm = false;
|
||||||
|
};
|
||||||
|
|
||||||
picoc = callPackage ../development/interpreters/picoc {};
|
picoc = callPackage ../development/interpreters/picoc {};
|
||||||
|
|
||||||
picolisp = callPackage ../development/interpreters/picolisp {};
|
picolisp = callPackage ../development/interpreters/picolisp {};
|
||||||
@ -13518,6 +13542,11 @@ in
|
|||||||
|
|
||||||
neard = callPackage ../servers/neard { };
|
neard = callPackage ../servers/neard { };
|
||||||
|
|
||||||
|
unit = callPackage ../servers/http/unit {
|
||||||
|
php71 = php71-unit;
|
||||||
|
php72 = php72-unit;
|
||||||
|
};
|
||||||
|
|
||||||
nginx = nginxStable;
|
nginx = nginxStable;
|
||||||
|
|
||||||
nginxStable = callPackage ../servers/http/nginx/stable.nix {
|
nginxStable = callPackage ../servers/http/nginx/stable.nix {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user