diff options
author | Alyssa Ross <hi@alyssa.is> | 2020-01-11 23:37:02 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2020-01-11 23:41:30 +0000 |
commit | 6c557e3f1c28cf87e9fba232811d6875dd1399c1 (patch) | |
tree | 035a071d5d8980df6de0fa42e2ef8fc0cce7055e /nixpkgs/pkgs/servers/http/nginx | |
parent | da7500bc026e937ac7fce7b50f67a0e1765737a7 (diff) | |
parent | e4134747f5666bcab8680aff67fa3b63384f9a0f (diff) | |
download | nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.gz nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.bz2 nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.lz nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.xz nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.zst nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.zip |
Merge commit 'e4134747f5666bcab8680aff67fa3b63384f9a0f'
Diffstat (limited to 'nixpkgs/pkgs/servers/http/nginx')
-rw-r--r-- | nixpkgs/pkgs/servers/http/nginx/generic.nix | 26 | ||||
-rw-r--r-- | nixpkgs/pkgs/servers/http/nginx/modules.nix | 9 | ||||
-rw-r--r-- | nixpkgs/pkgs/servers/http/nginx/nix-etag-1.15.4.patch | 18 |
3 files changed, 30 insertions, 23 deletions
diff --git a/nixpkgs/pkgs/servers/http/nginx/generic.nix b/nixpkgs/pkgs/servers/http/nginx/generic.nix index 3edbed22b6b6..990d7c5cf134 100644 --- a/nixpkgs/pkgs/servers/http/nginx/generic.nix +++ b/nixpkgs/pkgs/servers/http/nginx/generic.nix @@ -1,5 +1,6 @@ { stdenv, fetchurl, fetchpatch, openssl, zlib, pcre, libxml2, libxslt -, substituteAll, gd, geoip +, nixosTests +, substituteAll, gd, geoip, perl , withDebug ? false , withStream ? true , withMail ? false @@ -29,7 +30,7 @@ stdenv.mkDerivation { inherit sha256; }; - buildInputs = [ openssl zlib pcre libxml2 libxslt gd geoip ] + buildInputs = [ openssl zlib pcre libxml2 libxslt gd geoip perl ] ++ mapModules "inputs"; configureFlags = [ @@ -52,28 +53,30 @@ stdenv.mkDerivation { "--with-http_stub_status_module" "--with-threads" "--with-pcre-jit" - # Install destination problems - # "--with-http_perl_module" - ] ++ optional withDebug [ + ] ++ optionals withDebug [ "--with-debug" - ] ++ optional withStream [ + ] ++ optionals withStream [ "--with-stream" "--with-stream_geoip_module" "--with-stream_realip_module" "--with-stream_ssl_module" "--with-stream_ssl_preread_module" - ] ++ optional withMail [ + ] ++ optionals withMail [ "--with-mail" "--with-mail_ssl_module" + ] ++ optional (perl != null) [ + "--with-http_perl_module" + "--with-perl=${perl}/bin/perl" + "--with-perl_modules_path=lib/perl5" ] ++ 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 = [ + NIX_CFLAGS_COMPILE = toString ([ "-I${libxml2.dev}/include/libxml2" "-Wno-error=implicit-fallthrough" - ] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations"; + ] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations"); configurePlatforms = []; @@ -107,7 +110,10 @@ stdenv.mkDerivation { mv $out/sbin $out/bin ''; - passthru.modules = modules; + passthru = { + modules = modules; + tests.nginx = nixosTests.nginx; + }; meta = { description = "A reverse proxy and lightweight webserver"; diff --git a/nixpkgs/pkgs/servers/http/nginx/modules.nix b/nixpkgs/pkgs/servers/http/nginx/modules.nix index 5e21e8734bf1..78ad5c5582d8 100644 --- a/nixpkgs/pkgs/servers/http/nginx/modules.nix +++ b/nixpkgs/pkgs/servers/http/nginx/modules.nix @@ -258,6 +258,15 @@ in inputs = [ pkgs.pam ]; }; + pinba = { + src = fetchFromGitHub { + owner = "tony2001"; + repo = "ngx_http_pinba_module"; + rev = "28131255d4797a7e2f82a6a35cf9fc03c4678fe6"; + sha256 = "00fii8bjvyipq6q47xhjhm3ylj4rhzmlk3qwxmfpdn37j7bc8p8c"; + }; + }; + push-stream ={ src = fetchFromGitHub { owner = "wandenberg"; diff --git a/nixpkgs/pkgs/servers/http/nginx/nix-etag-1.15.4.patch b/nixpkgs/pkgs/servers/http/nginx/nix-etag-1.15.4.patch index 9dec715bf6c5..c1473ccdb1b9 100644 --- a/nixpkgs/pkgs/servers/http/nginx/nix-etag-1.15.4.patch +++ b/nixpkgs/pkgs/servers/http/nginx/nix-etag-1.15.4.patch @@ -1,14 +1,8 @@ -From f6a978f024d01202f954483423af1b2d5d5159a6 Mon Sep 17 00:00:00 2001 -From: Yegor Timoshenko <yegortimoshenko@riseup.net> -Date: Fri, 28 Sep 2018 03:27:04 +0000 -Subject: [PATCH] If root is in Nix store, set ETag to its path hash - ---- - src/http/ngx_http_core_module.c | 56 +++++++++++++++++++++++++++++---- - 1 file changed, 50 insertions(+), 6 deletions(-) +This patch makes it possible to serve static content from Nix store paths, by +using the hash of the store path for the ETag header. diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c -index c57ec00c..b7992de2 100644 +index cb49ef74..f88dc77c 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -1583,6 +1583,7 @@ ngx_http_set_etag(ngx_http_request_t *r) @@ -19,7 +13,7 @@ index c57ec00c..b7992de2 100644 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); -@@ -1598,16 +1599,61 @@ ngx_http_set_etag(ngx_http_request_t *r) +@@ -1598,16 +1599,62 @@ ngx_http_set_etag(ngx_http_request_t *r) etag->hash = 1; ngx_str_set(&etag->key, "ETag"); @@ -68,6 +62,7 @@ index c57ec00c..b7992de2 100644 + } + + ngx_memcpy(etag->value.data, ptr1, etag->value.len); ++ ngx_http_clear_last_modified(r); + } else { + etag->value.data = ngx_pnalloc(r->pool, NGX_OFF_T_LEN + NGX_TIME_T_LEN + 3); + @@ -87,6 +82,3 @@ index c57ec00c..b7992de2 100644 r->headers_out.etag = etag; --- -2.19.0 - |