nginxModules.http_proxy_connect_module: init

This adds the nginx module `ngx_http_proxy_connect_module` which allows
to tunnel HTTPS through an nginx proxy[1].

As this module contained patches for several nginx version, some minor
adjustments were needed:

* Allowed each entry in `nginxModules` to provide patches.

* Added an optional `supports` attribute to ensure that each module can
  determine if it supports the currently built nginx version (e.g. stable
  1.14 ATM or mainline 1.15 ATM).

[1] https://github.com/chobits/ngx_http_proxy_connect_module
This commit is contained in:
Maximilian Bosch
2019-03-29 23:53:09 +01:00
parent 6b1d7e9316
commit 37867dba74
2 changed files with 38 additions and 2 deletions
+25
View File
@@ -1,5 +1,22 @@
{ fetchFromGitHub, lib, pkgs }:
let
http_proxy_connect_module_generic = patchName: rec {
src = fetchFromGitHub {
owner = "chobits";
repo = "ngx_http_proxy_connect_module";
rev = "8201639082cba702211585b03d4cc7bc51c65167";
sha256 = "0z71x3xnlczrr2kq43w3drxj9g14fkk4jz66x921v0yb8r9mnn5a";
};
patches = [
"${src}/patch/${patchName}.patch"
];
};
in
{
brotli = {
src = let gitsrc = pkgs.fetchFromGitHub {
@@ -318,4 +335,12 @@
sha256 = "1jq2s9k7hah3b317hfn9y3g1q4g4x58k209psrfsqs718a9sw8c7";
};
};
http_proxy_connect_module_v15 = http_proxy_connect_module_generic "proxy_connect_rewrite_1015" // {
supports = with lib.versions; version: major version == "1" && minor version == "15";
};
http_proxy_connect_module_v14 = http_proxy_connect_module_generic "proxy_connect_rewrite_1014" // {
supports = with lib.versions; version: major version == "1" && minor version == "14";
};
}