80c7463a92
PHP 7.1 is currently on life support, as in only recieving security related patches. This will only continue until: 2019-12-01 This date are in the middle of the 19.09 lifecycle. So it would be nice to not have it in the 19.09 stable release. Dropping it now would also result in less maintanance in updating them. The death dates can be seen on following links: - https://endoflife.date/php - https://php.net/supported-versions.php - https://en.wikipedia.org/wiki/PHP#Release_history
68 lines
2.4 KiB
Nix
68 lines
2.4 KiB
Nix
{ stdenv, fetchFromGitHub, which
|
|
, withPython ? true, python
|
|
, withPHP72 ? true, php72
|
|
, withPHP73 ? false, php73
|
|
, withPerl ? true, perl
|
|
, withPerldevel ? false, perldevel
|
|
, withRuby_2_3 ? false, ruby_2_3
|
|
, withRuby_2_4 ? false, ruby_2_4
|
|
, withRuby ? true, ruby
|
|
, withSSL ? true, openssl ? null
|
|
, withIPv6 ? true
|
|
, withDebug ? false
|
|
}:
|
|
|
|
with stdenv.lib;
|
|
|
|
stdenv.mkDerivation rec {
|
|
version = "1.9.0";
|
|
name = "unit-${version}";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "nginx";
|
|
repo = "unit";
|
|
rev = "${version}";
|
|
sha256 = "0f7smgshfzksks2jfhi53g87wiyy38vwgj6aa70ql61m135dx7b1";
|
|
};
|
|
|
|
nativeBuildInputs = [ which ];
|
|
|
|
buildInputs = [ ]
|
|
++ optional withPython python
|
|
++ optional withPHP72 php72
|
|
++ optional withPHP73 php73
|
|
++ optional withPerl perl
|
|
++ optional withPerldevel perldevel
|
|
++ optional withRuby_2_3 ruby_2_3
|
|
++ optional withRuby_2_4 ruby_2_4
|
|
++ optional withRuby ruby
|
|
++ optional withSSL openssl;
|
|
|
|
configureFlags = [
|
|
"--control=unix:/run/unit/control.unit.sock"
|
|
"--pid=/run/unit/unit.pid"
|
|
"--user=unit"
|
|
"--group=unit"
|
|
] ++ optional withSSL [ "--openssl" ]
|
|
++ optional (!withIPv6) [ "--no-ipv6" ]
|
|
++ optional withDebug [ "--debug" ];
|
|
|
|
postConfigure = ''
|
|
${optionalString withPython "./configure python --module=python --config=${python}/bin/python-config --lib-path=${python}/lib"}
|
|
${optionalString withPHP72 "./configure php --module=php72 --config=${php72.dev}/bin/php-config --lib-path=${php72}/lib"}
|
|
${optionalString withPHP73 "./configure php --module=php73 --config=${php73.dev}/bin/php-config --lib-path=${php73}/lib"}
|
|
${optionalString withPerl "./configure perl --module=perl --perl=${perl}/bin/perl"}
|
|
${optionalString withPerldevel "./configure perl --module=perl529 --perl=${perldevel}/bin/perl"}
|
|
${optionalString withRuby_2_3 "./configure ruby --module=ruby23 --ruby=${ruby_2_3}/bin/ruby"}
|
|
${optionalString withRuby_2_4 "./configure ruby --module=ruby24 --ruby=${ruby_2_4}/bin/ruby"}
|
|
${optionalString withRuby "./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 ];
|
|
};
|
|
}
|