summary refs log tree commit diff
diff options
context:
space:
mode:
authorRenaud <c0bw3b@users.noreply.github.com>2019-05-26 23:52:36 +0200
committerGitHub <noreply@github.com>2019-05-26 23:52:36 +0200
commitf43b54f35e9f685121467f0369c01ea6d7d3b2ce (patch)
tree8912b6a31117b870674899ee76a3c348d9ab9ccf
parent9e04cb3143be0837e5fa8eea2d300f862b2dc535 (diff)
parentc9156695cc7b88df71567ee49e7604e02fc42a96 (diff)
downloadnixpkgs-f43b54f35e9f685121467f0369c01ea6d7d3b2ce.tar
nixpkgs-f43b54f35e9f685121467f0369c01ea6d7d3b2ce.tar.gz
nixpkgs-f43b54f35e9f685121467f0369c01ea6d7d3b2ce.tar.bz2
nixpkgs-f43b54f35e9f685121467f0369c01ea6d7d3b2ce.tar.lz
nixpkgs-f43b54f35e9f685121467f0369c01ea6d7d3b2ce.tar.xz
nixpkgs-f43b54f35e9f685121467f0369c01ea6d7d3b2ce.tar.zst
nixpkgs-f43b54f35e9f685121467f0369c01ea6d7d3b2ce.zip
Merge pull request #61907 from Izorkin/tengine
tengine: 2.2.3 -> 2.3.0
-rw-r--r--pkgs/servers/http/tengine/check-resolv-conf.patch14
-rw-r--r--pkgs/servers/http/tengine/default.nix43
2 files changed, 46 insertions, 11 deletions
diff --git a/pkgs/servers/http/tengine/check-resolv-conf.patch b/pkgs/servers/http/tengine/check-resolv-conf.patch
new file mode 100644
index 00000000000..c46482b3014
--- /dev/null
+++ b/pkgs/servers/http/tengine/check-resolv-conf.patch
@@ -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
+ 
diff --git a/pkgs/servers/http/tengine/default.nix b/pkgs/servers/http/tengine/default.nix
index fb343d1a05c..12dc207002d 100644
--- a/pkgs/servers/http/tengine/default.nix
+++ b/pkgs/servers/http/tengine/default.nix
@@ -1,8 +1,8 @@
 { stdenv, fetchurl, openssl, zlib, pcre, libxml2, libxslt
-, gd, geoip
+, gd, geoip, gperftools, jemalloc
 , withDebug ? false
 , withMail ? false
-, withIPv6 ? true
+, withStream ? false
 , modules ? []
 , ...
 }:
@@ -10,18 +10,22 @@
 with stdenv.lib;
 
 stdenv.mkDerivation rec {
-  version = "2.2.3";
+  version = "2.3.0";
   name = "tengine-${version}";
 
   src = fetchurl {
     url = "https://github.com/alibaba/tengine/archive/${version}.tar.gz";
-    sha256 = "0x12mfs0q7lihpl335ad222a1a2sdkqzj5q8zbybzr20frixjs42";
+    sha256 = "09165sdzad8bjxhnwphbags6yvxnz2rkf14p0w3vgvzssj017kqp";
   };
 
   buildInputs =
-    [ openssl zlib pcre libxml2 libxslt gd geoip ]
+    [ openssl zlib pcre libxml2 libxslt gd geoip gperftools jemalloc ]
     ++ concatMap (mod: mod.inputs or []) modules;
 
+  patches = [
+    ./check-resolv-conf.patch
+  ];
+
   configureFlags = [
     "--with-http_ssl_module"
     "--with-http_v2_module"
@@ -36,33 +40,50 @@ stdenv.mkDerivation rec {
     "--with-http_gunzip_module"
     "--with-http_gzip_static_module"
     "--with-http_auth_request_module"
-    "--with-http_concat_module"
     "--with-http_random_index_module"
     "--with-http_secure_link_module"
     "--with-http_degradation_module"
     "--with-http_stub_status_module"
-    "--with-http_sysguard_module"
     "--with-threads"
     "--with-pcre-jit"
     "--with-http_slice_module"
+    "--with-select_module"
+    "--with-poll_module"
+    "--with-google_perftools_module"
+    "--with-jemalloc"
   ] ++ optional withDebug [
     "--with-debug"
   ] ++ optional withMail [
     "--with-mail"
     "--with-mail_ssl_module"
-  ] ++ optional (withMail != true) [
+  ] ++ optional (!withMail) [
     "--without-mail_pop3_module"
     "--without-mail_imap_module"
     "--without-mail_smtp_module"
-  ] ++ optional withIPv6 [
-    "--with-ipv6"
+  ] ++ optional withStream [
+    "--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 (with stdenv.hostPlatform; isLinux || isFreeBSD) "--with-file-aio"
     ++ map (mod: "--add-module=${mod.src}") modules;
 
   NIX_CFLAGS_COMPILE = [
     "-I${libxml2.dev}/include/libxml2"
-    "-Wno-error=implicit-fallthrough"
   ] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations";
 
   preConfigure = (concatMapStringsSep "\n" (mod: mod.preConfigure or "") modules);