tengine: 2.2.3 -> 2.3.0

This commit is contained in:
Izorkin 2019-05-22 21:26:08 +03:00
parent ab5926ba67
commit c9156695cc
2 changed files with 46 additions and 11 deletions

View File

@ -0,0 +1,14 @@
diff --git a/auto/unix b/auto/unix
index a38c12dc..025a4899 100644
--- a/auto/unix
+++ b/auto/unix
@@ -1072,9 +1072,7 @@ ngx_feature_test='int fd;
# Auto read nameserver from /etc/resolv.conf.
- if [ -f "/etc/resolv.conf" ]; then
have=NGX_RESOLVER_FILE
value=\"/etc/resolv.conf\"
. auto/define
-fi

View File

@ -1,8 +1,8 @@
{ stdenv, fetchurl, openssl, zlib, pcre, libxml2, libxslt { stdenv, fetchurl, openssl, zlib, pcre, libxml2, libxslt
, gd, geoip , gd, geoip, gperftools, jemalloc
, withDebug ? false , withDebug ? false
, withMail ? false , withMail ? false
, withIPv6 ? true , withStream ? false
, modules ? [] , modules ? []
, ... , ...
}: }:
@ -10,18 +10,22 @@
with stdenv.lib; with stdenv.lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "2.2.3"; version = "2.3.0";
name = "tengine-${version}"; name = "tengine-${version}";
src = fetchurl { src = fetchurl {
url = "https://github.com/alibaba/tengine/archive/${version}.tar.gz"; url = "https://github.com/alibaba/tengine/archive/${version}.tar.gz";
sha256 = "0x12mfs0q7lihpl335ad222a1a2sdkqzj5q8zbybzr20frixjs42"; sha256 = "09165sdzad8bjxhnwphbags6yvxnz2rkf14p0w3vgvzssj017kqp";
}; };
buildInputs = buildInputs =
[ openssl zlib pcre libxml2 libxslt gd geoip ] [ openssl zlib pcre libxml2 libxslt gd geoip gperftools jemalloc ]
++ concatMap (mod: mod.inputs or []) modules; ++ concatMap (mod: mod.inputs or []) modules;
patches = [
./check-resolv-conf.patch
];
configureFlags = [ configureFlags = [
"--with-http_ssl_module" "--with-http_ssl_module"
"--with-http_v2_module" "--with-http_v2_module"
@ -36,33 +40,50 @@ stdenv.mkDerivation rec {
"--with-http_gunzip_module" "--with-http_gunzip_module"
"--with-http_gzip_static_module" "--with-http_gzip_static_module"
"--with-http_auth_request_module" "--with-http_auth_request_module"
"--with-http_concat_module"
"--with-http_random_index_module" "--with-http_random_index_module"
"--with-http_secure_link_module" "--with-http_secure_link_module"
"--with-http_degradation_module" "--with-http_degradation_module"
"--with-http_stub_status_module" "--with-http_stub_status_module"
"--with-http_sysguard_module"
"--with-threads" "--with-threads"
"--with-pcre-jit" "--with-pcre-jit"
"--with-http_slice_module" "--with-http_slice_module"
"--with-select_module"
"--with-poll_module"
"--with-google_perftools_module"
"--with-jemalloc"
] ++ optional withDebug [ ] ++ optional withDebug [
"--with-debug" "--with-debug"
] ++ optional withMail [ ] ++ optional withMail [
"--with-mail" "--with-mail"
"--with-mail_ssl_module" "--with-mail_ssl_module"
] ++ optional (withMail != true) [ ] ++ optional (!withMail) [
"--without-mail_pop3_module" "--without-mail_pop3_module"
"--without-mail_imap_module" "--without-mail_imap_module"
"--without-mail_smtp_module" "--without-mail_smtp_module"
] ++ optional withIPv6 [ ] ++ optional withStream [
"--with-ipv6" "--with-stream"
"--with-stream_ssl_module"
"--with-stream_realip_module"
"--with-stream_geoip_module"
"--with-stream_ssl_preread_module"
"--with-stream_sni"
] ++ optional (!withStream) [
"--without-stream_limit_conn_module"
"--without-stream_access_module"
"--without-stream_geo_module"
"--without-stream_map_module"
"--without-stream_split_clients_module"
"--without-stream_return_module"
"--without-stream_upstream_hash_module"
"--without-stream_upstream_least_conn_module"
"--without-stream_upstream_random_module"
"--without-stream_upstream_zone_module"
] ++ optional (gd != null) "--with-http_image_filter_module" ] ++ optional (gd != null) "--with-http_image_filter_module"
++ optional (with stdenv.hostPlatform; isLinux || isFreeBSD) "--with-file-aio" ++ optional (with stdenv.hostPlatform; isLinux || isFreeBSD) "--with-file-aio"
++ map (mod: "--add-module=${mod.src}") modules; ++ map (mod: "--add-module=${mod.src}") modules;
NIX_CFLAGS_COMPILE = [ NIX_CFLAGS_COMPILE = [
"-I${libxml2.dev}/include/libxml2" "-I${libxml2.dev}/include/libxml2"
"-Wno-error=implicit-fallthrough"
] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations"; ] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations";
preConfigure = (concatMapStringsSep "\n" (mod: mod.preConfigure or "") modules); preConfigure = (concatMapStringsSep "\n" (mod: mod.preConfigure or "") modules);