2017-11-25 19:47:26 +00:00
|
|
|
{ fetchFromGitHub, fetchurl, lib, pkgs }:
|
2015-10-19 09:48:43 +01:00
|
|
|
|
|
|
|
{
|
2016-01-21 21:14:39 +00:00
|
|
|
brotli = {
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = "ngx_brotli";
|
2017-11-29 00:49:48 +00:00
|
|
|
rev = "bfd2885b2da4d763fed18f49216bb935223cd34b";
|
|
|
|
sha256 = "04yx1n0wi3l2x37jd1ynl9951qxkn8xp42yv0mfp1qz9svips81n";
|
|
|
|
fetchSubmodules = true;
|
2016-01-21 21:14:39 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2017-11-25 19:47:26 +00:00
|
|
|
rtmp ={
|
2015-10-19 09:48:43 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "arut";
|
|
|
|
repo = "nginx-rtmp-module";
|
2017-11-25 19:47:26 +00:00
|
|
|
rev = "v1.2.1";
|
|
|
|
sha256 = "0na1aam176irz6w148hnvamqy1ilbn4abhdzkva0yrm35a3ksbzn";
|
2015-10-19 09:48:43 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
dav = {
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "arut";
|
|
|
|
repo = "nginx-dav-ext-module";
|
2017-08-26 17:06:54 +01:00
|
|
|
rev = "v0.1.0";
|
|
|
|
sha256 = "1ifahd69vz715g3zim618jbmxb7kcmzykc696grskxm0svpy294k";
|
2015-10-19 09:48:43 +01:00
|
|
|
};
|
|
|
|
inputs = [ pkgs.expat ];
|
|
|
|
};
|
|
|
|
|
|
|
|
moreheaders = {
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "openresty";
|
|
|
|
repo = "headers-more-nginx-module";
|
|
|
|
rev = "v0.26";
|
2017-10-31 22:03:34 +00:00
|
|
|
sha256 = "0zhr3ai4xf5yghxvlbrwv8n06fgx33f1n1d4a6gmsczdfjzf8g6g";
|
2015-10-19 09:48:43 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
modsecurity = {
|
|
|
|
src = "${pkgs.modsecurity_standalone.nginx}/nginx/modsecurity";
|
|
|
|
inputs = [ pkgs.curl pkgs.apr pkgs.aprutil pkgs.apacheHttpd pkgs.yajl ];
|
|
|
|
preConfigure = ''
|
2016-04-16 17:41:43 +01:00
|
|
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${pkgs.aprutil.dev}/include/apr-1 -I${pkgs.apacheHttpd.dev}/include -I${pkgs.apr.dev}/include/apr-1 -I${pkgs.yajl}/include"
|
2015-10-19 09:48:43 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2017-12-21 20:41:38 +00:00
|
|
|
modsecurity-nginx = {
|
2017-11-26 12:57:19 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SpiderLabs";
|
|
|
|
repo = "ModSecurity-nginx";
|
2017-12-21 20:41:38 +00:00
|
|
|
rev = "v1.0.0";
|
|
|
|
sha256 = "0zzpdqhbdqqy8kjkszv0mrq6136ah9v3zwr1jbh312j8izmzdyi7";
|
2017-11-26 12:57:19 +00:00
|
|
|
};
|
|
|
|
inputs = [ pkgs.curl pkgs.geoip pkgs.libmodsecurity pkgs.libxml2 pkgs.lmdb pkgs.yajl ];
|
|
|
|
};
|
|
|
|
|
2015-10-19 09:48:43 +01:00
|
|
|
echo = {
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "openresty";
|
|
|
|
repo = "echo-nginx-module";
|
2017-09-21 09:34:25 +01:00
|
|
|
rev = "v0.61";
|
|
|
|
sha256 = "0brjhhphi94ms4gia7za0mfx0png4jbhvq6j0nzjwp537iyiy23k";
|
2015-10-19 09:48:43 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
develkit = {
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "simpl";
|
|
|
|
repo = "ngx_devel_kit";
|
2016-09-09 00:20:27 +01:00
|
|
|
rev = "v0.3.0";
|
|
|
|
sha256 = "1br1997zqsjcb1aqm6h6xmi5yx7akxk0qvk8wxc0fnvmyhgzxgx0";
|
2015-10-19 09:48:43 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
lua = {
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "openresty";
|
|
|
|
repo = "lua-nginx-module";
|
2017-09-14 21:18:57 +01:00
|
|
|
rev = "v0.10.10";
|
|
|
|
sha256 = "1dlqnlkpn3pnhk2m09jdx3iw3m6xk31pw2m5xrpcmqk3bll68mw6";
|
2015-10-19 09:48:43 +01:00
|
|
|
};
|
|
|
|
inputs = [ pkgs.luajit ];
|
|
|
|
preConfigure = ''
|
|
|
|
export LUAJIT_LIB="${pkgs.luajit}/lib"
|
|
|
|
export LUAJIT_INC="${pkgs.luajit}/include/luajit-2.0"
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
set-misc = {
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "openresty";
|
|
|
|
repo = "set-misc-nginx-module";
|
|
|
|
rev = "v0.28";
|
|
|
|
sha256 = "1vixj60q0liri7k5ax85grj7q9vvgybkx421bwphbhai5xrjip96";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
fluentd = {
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "fluent";
|
|
|
|
repo = "nginx-fluentd-module";
|
|
|
|
rev = "8af234043059c857be27879bc547c141eafd5c13";
|
|
|
|
sha256 = "1ycb5zd9sw60ra53jpak1m73zwrjikwhrrh9q6266h1mlyns7zxm";
|
|
|
|
};
|
|
|
|
};
|
2015-10-19 09:49:03 +01:00
|
|
|
|
|
|
|
pam = {
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "stogh";
|
|
|
|
repo = "ngx_http_auth_pam_module";
|
|
|
|
rev = "v1.4";
|
|
|
|
sha256 = "068zwyrc1dji55rlaj2kx6n0v2n5rpj7nz26ipvz26ida712md35";
|
|
|
|
};
|
|
|
|
inputs = [ pkgs.pam ];
|
|
|
|
};
|
2016-01-23 22:25:49 +00:00
|
|
|
|
|
|
|
statsd = {
|
|
|
|
src = fetchFromGitHub {
|
2016-09-08 23:59:11 +01:00
|
|
|
owner = "apcera";
|
2016-01-23 22:25:49 +00:00
|
|
|
repo = "nginx-statsd";
|
2016-09-08 23:59:11 +01:00
|
|
|
rev = "2147d61dc31dd4865604be92349e6192a905d21a";
|
|
|
|
sha256 = "19s3kwjgf51jkwknh7cfi82p6kifl8rl146wxc3ijds12776ilsv";
|
2016-01-23 22:25:49 +00:00
|
|
|
};
|
|
|
|
};
|
2016-09-08 19:57:46 +01:00
|
|
|
|
|
|
|
upstream-check = {
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "yaoweibin";
|
|
|
|
repo = "nginx_upstream_check_module";
|
|
|
|
rev = "10782eaff51872a8f44e65eed89bbe286004bcb1";
|
|
|
|
sha256 = "0h98a8kiw2qkqfavysm1v16kf4cs4h39j583wapif4p0qx3bbm89";
|
|
|
|
};
|
|
|
|
};
|
2017-01-05 21:33:11 +00:00
|
|
|
|
|
|
|
# For an example usage, see https://easyengine.io/wordpress-nginx/tutorials/single-site/fastcgi-cache-with-purging/
|
|
|
|
fastcgi-cache-purge = {
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "FRiCKLE";
|
|
|
|
repo = "ngx_cache_purge";
|
|
|
|
rev = "2.3";
|
|
|
|
sha256 = "0ib2jrbjwrhvmihhnzkp4w87fxssbbmmmj6lfdwpm6ni8p9g60dw";
|
|
|
|
};
|
|
|
|
};
|
2017-01-06 07:09:54 +00:00
|
|
|
|
|
|
|
pagespeed =
|
|
|
|
let
|
|
|
|
version = pkgs.psol.version;
|
|
|
|
|
|
|
|
moduleSrc = fetchFromGitHub {
|
|
|
|
owner = "pagespeed";
|
|
|
|
repo = "ngx_pagespeed";
|
2018-02-13 21:17:21 +00:00
|
|
|
rev = "v${version}-stable";
|
2018-01-30 20:46:52 +00:00
|
|
|
sha256 = "0ry7vmkb2bx0sspl1kgjlrzzz6lbz07313ks2lr80rrdm2zb16wp";
|
2017-01-06 07:09:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
ngx_pagespeed = pkgs.runCommand
|
|
|
|
"ngx_pagespeed"
|
|
|
|
{
|
|
|
|
meta = {
|
|
|
|
description = "PageSpeed module for Nginx";
|
|
|
|
homepage = "https://developers.google.com/speed/pagespeed/module/";
|
|
|
|
license = pkgs.stdenv.lib.licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
''
|
|
|
|
cp -r "${moduleSrc}" "$out"
|
|
|
|
chmod -R +w "$out"
|
|
|
|
ln -s "${pkgs.psol}" "$out/psol"
|
|
|
|
'';
|
|
|
|
in {
|
|
|
|
src = ngx_pagespeed;
|
2018-01-09 16:32:02 +00:00
|
|
|
inputs = [ pkgs.zlib pkgs.libuuid ]; # psol deps
|
2017-01-06 07:09:54 +00:00
|
|
|
};
|
2017-05-01 22:07:47 +01:00
|
|
|
|
|
|
|
shibboleth = {
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nginx-shib";
|
|
|
|
repo = "nginx-http-shibboleth";
|
|
|
|
rev = "48b70d87bf7796d7813813a837e52b3a86e6f6f4";
|
|
|
|
sha256 = "0k8xcln5sf0m4r0m550dkhl07zhncp285dpysk6r4v6vqzqmhzdc";
|
|
|
|
};
|
|
|
|
};
|
2015-10-19 09:48:43 +01:00
|
|
|
}
|