diff options
author | Izorkin <izorkin@elven.pw> | 2018-12-14 21:34:43 +0300 |
---|---|---|
committer | Izorkin <izorkin@elven.pw> | 2018-12-22 11:23:38 +0300 |
commit | eaf136b6b8ea5eff2e33dddcf746d13001921508 (patch) | |
tree | 6cc39a4216bc723d9e86186bf13449c2896e9210 /pkgs | |
parent | e17cb15e73ec034a79d10589dc74cd4bc3716599 (diff) | |
download | nixlib-eaf136b6b8ea5eff2e33dddcf746d13001921508.tar nixlib-eaf136b6b8ea5eff2e33dddcf746d13001921508.tar.gz nixlib-eaf136b6b8ea5eff2e33dddcf746d13001921508.tar.bz2 nixlib-eaf136b6b8ea5eff2e33dddcf746d13001921508.tar.lz nixlib-eaf136b6b8ea5eff2e33dddcf746d13001921508.tar.xz nixlib-eaf136b6b8ea5eff2e33dddcf746d13001921508.tar.zst nixlib-eaf136b6b8ea5eff2e33dddcf746d13001921508.zip |
unit: 1.6 -> 1.7
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/servers/http/unit/default.nix | 74 |
1 files changed, 38 insertions, 36 deletions
diff --git a/pkgs/servers/http/unit/default.nix b/pkgs/servers/http/unit/default.nix index 38212885541f..a3948bb69088 100644 --- a/pkgs/servers/http/unit/default.nix +++ b/pkgs/servers/http/unit/default.nix @@ -1,14 +1,13 @@ -{ stdenv, fetchurl -, which -, python -, php71 -, php72 -, php73 -, perl -, perldevel -, ruby_2_3 -, ruby_2_4 -, ruby +{ stdenv, fetchFromGitHub, which +, withPython ? true, python +, withPHP71 ? false, php71 +, 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 @@ -17,26 +16,29 @@ with stdenv.lib; stdenv.mkDerivation rec { - version = "1.6"; + version = "1.7"; name = "unit-${version}"; - src = fetchurl { - url = "https://unit.nginx.org/download/${name}.tar.gz"; - sha256 = "0lws5xpzkcmv0gc7vi8pgnymin02dq4gw0zb41jfzq0vbljxxl14"; + src = fetchFromGitHub { + owner = "nginx"; + repo = "unit"; + rev = "${version}"; + sha256 = "1klwricr0mxhw5wka35vnl919821vcvaf5w3ixvkbxaisml19qq4"; }; - buildInputs = [ - which - python - php71 - php72 - php73 - perl - perldevel - ruby_2_3 - ruby_2_4 - ruby - ] ++ optional withSSL openssl; + nativeBuildInputs = [ which ]; + + buildInputs = [ ] + ++ optional withPython python + ++ optional withPHP71 php71 + ++ 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/control.unit.sock" @@ -46,15 +48,15 @@ stdenv.mkDerivation rec { ++ 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 php --module=php73 --config=${php73.dev}/bin/php-config --lib-path=${php73}/lib - ./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 + ${optionalString withPython "./configure python --module=python --config=${python}/bin/python-config --lib-path=${python}/lib"} + ${optionalString withPHP71 "./configure php --module=php71 --config=${php71.dev}/bin/php-config --lib-path=${php71}/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 = { |