treewide/nixos: remove `with lib;` part 5 (#335647)
[NixPkgs.git] / pkgs / servers / http / nginx / modules.nix
blob1152a7eb8ac328e737ee738e7bf4f592841dfb77
1 { lib
2 , config
3 , fetchFromGitHub
4 , fetchFromGitLab
5 , fetchhg
6 , runCommand
8 , arpa2common
9 , brotli
10 , curl
11 , expat
12 , fdk_aac
13 , ffmpeg-headless
14 , ffmpeg_6-headless
15 , geoip
16 , libbsd
17 , libiconv
18 , libjpeg
19 , libkrb5
20 , libmaxminddb
21 , libmodsecurity
22 , libuuid
23 , libxml2
24 , lmdb
25 , luajit_openresty
26 , msgpuck
27 , openssl
28 , opentracing-cpp
29 , pam
30 , psol
31 , which
32 , yajl
33 , zlib
34 , zstd
37 let
39   http_proxy_connect_module_generic = patchName: rec {
40     name = "http_proxy_connect";
41     src = fetchFromGitHub {
42       name = "http_proxy_connect_module_generic";
43       owner = "chobits";
44       repo = "ngx_http_proxy_connect_module";
45       # 2023-06-19
46       rev = "dcb9a2c614d376b820d774db510d4da12dfe1e5b";
47       hash = "sha256-AzMhTSzmk3osSYy2q28/hko1v2AOTnY/dP5IprqGlQo=";
48     };
50     patches = [
51       "${src}/patch/${patchName}.patch"
52     ];
54     meta = with lib; {
55       description = "Forward proxy module for CONNECT request handling";
56       homepage = "https://github.com/chobits/ngx_http_proxy_connect_module";
57       license = with licenses; [ bsd2 ];
58       maintainers = [ ];
59     };
60   };
64 let self = {
65   akamai-token-validate = {
66     name = "akamai-token-validate";
67     src = fetchFromGitHub {
68       name = "akamai-token-validate";
69       owner = "kaltura";
70       repo = "nginx-akamai-token-validate-module";
71       rev = "34fd0c94d2c43c642f323491c4f4a226cd83b962";
72       sha256 = "0yf34s11vgkcl03wbl6gjngm3p9hs8vvm7hkjkwhjh39vkk2a7cy";
73     };
75     inputs = [ openssl ];
77     meta = with lib; {
78       description = "Validates Akamai v2 query string tokens";
79       homepage = "https://github.com/kaltura/nginx-akamai-token-validate-module";
80       license = with licenses; [ agpl3Only ];
81       maintainers = [ ];
82     };
83   };
85   auth-a2aclr = {
86     name = "auth-a2aclr";
87     src = fetchFromGitLab {
88       name = "auth-a2aclr";
89       owner = "arpa2";
90       repo = "nginx-auth-a2aclr";
91       rev = "bbabf9480bb2b40ac581551883a18dfa6522dd63";
92       sha256 = "sha256-h2LgMhreCgod+H/bNQzY9BvqG9ezkwikwWB3T6gHH04=";
93     };
95     inputs = [
96       (arpa2common.overrideAttrs
97         (old: rec {
98           version = "0.7.1";
100           src = fetchFromGitLab {
101             owner = "arpa2";
102             repo = "arpa2common";
103             rev = "v${version}";
104             sha256 = "sha256-8zVsAlGtmya9EK4OkGUMu2FKJRn2Q3bg2QWGjqcii64=";
105           };
106         }))
107     ];
109     meta = with lib; {
110       description = "Integrate ARPA2 Resource ACLs into nginx";
111       homepage = "https://gitlab.com/arpa2/nginx-auth-a2aclr";
112       license = with licenses; [ isc ];
113       maintainers = [ ];
114     };
115   };
117   aws-auth = {
118     name = "aws-auth";
119     src = fetchFromGitHub {
120       name = "aws-auth";
121       owner = "anomalizer";
122       repo = "ngx_aws_auth";
123       rev = "2.1.1";
124       sha256 = "10z67g40w7wpd13fwxyknkbg3p6hn61i4v8xw6lh27br29v1y6h9";
125     };
127     meta = with lib; {
128       description = "Proxy to authenticated AWS services";
129       homepage = "https://github.com/anomalizer/ngx_aws_auth";
130       license = with licenses; [ bsd2 ];
131       maintainers = [ ];
132     };
133   };
135   brotli = {
136     name = "brotli";
137     src = let src' = fetchFromGitHub {
138       name = "brotli";
139       owner = "google";
140       repo = "ngx_brotli";
141       rev = "6e975bcb015f62e1f303054897783355e2a877dc";
142       sha256 = "sha256-G0IDYlvaQzzJ6cNTSGbfuOuSXFp3RsEwIJLGapTbDgo=";
143     }; in
144       runCommand "brotli" { } ''
145         cp -a ${src'} $out
146         substituteInPlace $out/filter/config \
147           --replace '$ngx_addon_dir/deps/brotli/c' ${lib.getDev brotli}
148       '';
150     inputs = [ brotli ];
152     meta = with lib; {
153       description = "Brotli compression";
154       homepage = "https://github.com/google/ngx_brotli";
155       license = with licenses; [ bsd2 ];
156       maintainers = [ ];
157     };
158   };
160   cache-purge = {
161     name = "cache-purge";
162     src = fetchFromGitHub {
163       name = "cache-purge";
164       owner = "nginx-modules";
165       repo = "ngx_cache_purge";
166       rev = "2.5.1";
167       sha256 = "0va4jz36mxj76nmq05n3fgnpdad30cslg7c10vnlhdmmic9vqncd";
168     };
170     meta = with lib; {
171       description = "Adds ability to purge content from FastCGI, proxy, SCGI and uWSGI caches";
172       homepage = "https://github.com/nginx-modules/ngx_cache_purge";
173       license = with licenses; [ bsd2 ];
174       maintainers = [ ];
175     };
176   };
178   coolkit = {
179     name = "coolkit";
180     src = fetchFromGitHub {
181       name = "coolkit";
182       owner = "FRiCKLE";
183       repo = "ngx_coolkit";
184       rev = "0.2";
185       sha256 = "1idj0cqmfsdqawjcqpr1fsq670fdki51ksqk2lslfpcs3yrfjpqh";
186     };
188     meta = with lib; {
189       description = "Collection of small and useful nginx add-ons";
190       homepage = "https://github.com/FRiCKLE/ngx_coolkit";
191       license = with licenses; [ bsd2 ];
192       maintainers = [ ];
193     };
194   };
196   dav = {
197     name = "dav";
198     src = fetchFromGitHub {
199       name = "dav";
200       owner = "arut";
201       repo = "nginx-dav-ext-module";
202       rev = "v3.0.0";
203       sha256 = "000dm5zk0m1hm1iq60aff5r6y8xmqd7djrwhgnz9ig01xyhnjv9w";
204     };
206     inputs = [ expat ];
208     meta = with lib; {
209       description = "WebDAV PROPFIND,OPTIONS,LOCK,UNLOCK support";
210       homepage = "https://github.com/arut/nginx-dav-ext-module";
211       license = with licenses; [ bsd2 ];
212       maintainers = [ ];
213     };
214   };
216   develkit = {
217     name = "develkit";
218     src = fetchFromGitHub {
219       name = "develkit";
220       owner = "vision5";
221       repo = "ngx_devel_kit";
222       rev = "v0.3.3";
223       hash= "sha256-/RQUVHwIdNqm3UemQ/oNs2ksg8beziA4Pxejd5Yg0Pg=";
224     };
226     meta = with lib; {
227       description = "Adds additional generic tools that module developers can use in their own modules";
228       homepage = "https://github.com/vision5/ngx_devel_kit";
229       license = with licenses; [ bsd3 ];
230       maintainers = [ ];
231     };
232   };
234   echo = rec {
235     name = "echo";
236     version = "0.63";
238     src = fetchFromGitHub {
239       name = "echo";
240       owner = "openresty";
241       repo = "echo-nginx-module";
242       rev = "v${version}";
243       hash = "sha256-K7oOE0yxPYLf+3YMVbBsncpHRpGHXjs/8B5QPO3MQC4=";
244     };
246     meta = with lib; {
247       description = "Brings echo, sleep, time, exec and more shell-style goodies to Nginx";
248       homepage = "https://github.com/openresty/echo-nginx-module";
249       license = with licenses; [ bsd2 ];
250       maintainers = [ ];
251     };
252   };
254   fancyindex = {
255     name = "fancyindex";
256     src = fetchFromGitHub {
257       name = "fancyindex";
258       owner = "aperezdc";
259       repo = "ngx-fancyindex";
260       rev = "v0.5.2";
261       sha256 = "0nar45lp3jays3p6b01a78a6gwh6v0snpzcncgiphcqmj5kw8ipg";
262     };
264     meta = with lib; {
265       description = " Fancy indexes module";
266       homepage = "https://github.com/aperezdc/ngx-fancyindex";
267       license = with licenses; [ bsd2 ];
268       maintainers = with maintainers; [ aneeshusa ];
269     };
270   };
272   fluentd = {
273     name = "fluentd";
274     src = fetchFromGitHub {
275       name = "fluentd";
276       owner = "fluent";
277       repo = "nginx-fluentd-module";
278       rev = "8af234043059c857be27879bc547c141eafd5c13";
279       sha256 = "1ycb5zd9sw60ra53jpak1m73zwrjikwhrrh9q6266h1mlyns7zxm";
280     };
282     meta = with lib; {
283       description = "Fluentd data collector";
284       homepage = "https://github.com/fluent/nginx-fluentd-module";
285       license = with licenses; [ asl20 ];
286       maintainers = [ ];
287     };
288   };
290   geoip2 = {
291     name = "geoip2";
292     src = fetchFromGitHub {
293       name = "geoip2";
294       owner = "leev";
295       repo = "ngx_http_geoip2_module";
296       rev = "3.4";
297       sha256 = "CAs1JZsHY7RymSBYbumC2BENsXtZP3p4ljH5QKwz5yg=";
298     };
300     inputs = [ libmaxminddb ];
302     meta = with lib; {
303       description = "Creates variables with values from the maxmind geoip2 databases";
304       homepage = "https://github.com/leev/ngx_http_geoip2_module";
305       license = with licenses; [ bsd2 ];
306       maintainers = with maintainers; [ pinpox ];
307     };
308   };
310   http_proxy_connect_module_v24 = http_proxy_connect_module_generic "proxy_connect_rewrite_102101" // {
311     supports = with lib.versions; version: major version == "1" && minor version == "24";
312   };
314   http_proxy_connect_module_v25 = http_proxy_connect_module_generic "proxy_connect_rewrite_102101" // {
315     supports = with lib.versions; version: major version == "1" && minor version == "25";
316   };
318   ipscrub = {
319     name = "ipscrub";
320     src = fetchFromGitHub {
321       name = "ipscrub";
322       owner = "masonicboom";
323       repo = "ipscrub";
324       rev = "v1.0.1";
325       sha256 = "0qcx15c8wbsmyz2hkmyy5yd7qn1n84kx9amaxnfxkpqi05vzm1zz";
326     } + "/ipscrub";
328     inputs = [ libbsd ];
330     meta = with lib; {
331       description = " IP address anonymizer";
332       homepage = "https://github.com/masonicboom/ipscrub";
333       license = with licenses; [ bsd3 ];
334       maintainers = [ ];
335     };
336   };
338   limit-speed = {
339     name = "limit-speed";
340     src = fetchFromGitHub {
341       name = "limit-speed";
342       owner = "yaoweibin";
343       repo = "nginx_limit_speed_module";
344       rev = "f77ad4a56fbb134878e75827b40cf801990ed936";
345       sha256 = "0kkrd08zpcwx938i2is07vq6pgjkvn97xzjab0g4zaz8bivgmjp8";
346     };
348     meta = with lib; {
349       description = "Limit the total speed from the specific user";
350       homepage = "https://github.com/yaoweibin/nginx_limit_speed_module";
351       license = with licenses; [ bsd2 ];
352       maintainers = [ ];
353     };
354   };
356   live = {
357     name = "live";
358     src = fetchFromGitHub {
359       name = "live";
360       owner = "arut";
361       repo = "nginx-live-module";
362       rev = "5e4a1e3a718e65e5206c24eba00d42b0d1c4b7dd";
363       sha256 = "1kpnhl4b50zim84z22ahqxyxfq4jv8ab85kzsy2n5ciqbyg491lz";
364     };
366     meta = with lib; {
367       description = "HTTP live module";
368       homepage = "https://github.com/arut/nginx-live-module";
369       license = with licenses; [ bsd2 ];
370       maintainers = [ ];
371     };
372   };
374   lua = rec {
375     name = "lua";
376     version = "0.10.26";
378     src = fetchFromGitHub {
379       name = "lua";
380       owner = "openresty";
381       repo = "lua-nginx-module";
382       rev = "v${version}";
383       hash = "sha256-007up/XncaSBimBumHpbwgB1WnkXgBe8e/q/yT6vthI=";
384     };
386     inputs = [ luajit_openresty ];
388     preConfigure = ''
389       export LUAJIT_LIB="${luajit_openresty}/lib"
390       export LUAJIT_INC="$(realpath ${luajit_openresty}/include/luajit-*)"
392       # make source directory writable to allow generating src/ngx_http_lua_autoconf.h
393       lua_src=$TMPDIR/lua-src
394       cp -r "${src}/" "$lua_src"
395       chmod -R +w "$lua_src"
396       export configureFlags="''${configureFlags//"${src}"/"$lua_src"}"
397       unset lua_src
398     '';
400     allowMemoryWriteExecute = true;
402     meta = with lib; {
403       description = "Embed the Power of Lua";
404       homepage = "https://github.com/openresty/lua-nginx-module";
405       license = with licenses; [ bsd2 ];
406       maintainers = [ ];
407     };
408   };
410   lua-upstream = {
411     name = "lua-upstream";
412     src = fetchFromGitHub {
413       name = "lua-upstream";
414       owner = "openresty";
415       repo = "lua-upstream-nginx-module";
416       rev = "v0.07";
417       sha256 = "1gqccg8airli3i9103zv1zfwbjm27h235qjabfbfqk503rjamkpk";
418     };
420     inputs = [ luajit_openresty ];
421     allowMemoryWriteExecute = true;
423     meta = with lib; {
424       description = "Expose Lua API to ngx_lua for Nginx upstreams";
425       homepage = "https://github.com/openresty/lua-upstream-nginx-module";
426       license = with licenses; [ bsd2 ];
427       maintainers = [ ];
428     };
429   };
431   modsecurity = {
432     name = "modsecurity";
433     src = fetchFromGitHub {
434       name = "modsecurity-nginx";
435       owner = "SpiderLabs";
436       repo = "ModSecurity-nginx";
437       rev = "v1.0.3";
438       sha256 = "sha256-xp0/eqi5PJlzb9NaUbNnzEqNcxDPyjyNwZOwmlv1+ag=";
439     };
441     inputs = [ curl geoip libmodsecurity libxml2 lmdb yajl ];
443     meta = with lib; {
444       description = "Open source, cross platform web application firewall (WAF)";
445       homepage = "https://github.com/SpiderLabs/ModSecurity";
446       license = with licenses; [ asl20 ];
447       maintainers = [ ];
448     };
449   };
451   moreheaders = {
452     name = "moreheaders";
453     src = fetchFromGitHub {
454       name = "moreheaders";
455       owner = "openresty";
456       repo = "headers-more-nginx-module";
457       rev = "v0.36";
458       sha256 = "sha256-X+ygIesQ9PGm5yM+u1BOLYVpm1172P8jWwXNr3ixFY4=";
459     };
461     meta = with lib; {
462       description = "Set, add, and clear arbitrary output headers";
463       homepage = "https://github.com/openresty/headers-more-nginx-module";
464       license = with licenses; [ bsd2 ];
465       maintainers = with maintainers; [ SuperSandro2000 ];
466     };
467   };
469   mpeg-ts = {
470     name = "mpeg-ts";
471     src = fetchFromGitHub {
472       name = "mpeg-ts";
473       owner = "arut";
474       repo = "nginx-ts-module";
475       rev = "v0.1.1";
476       sha256 = "12dxcyy6wna1fccl3a9lnsbymd6p4apnwz6c24w74v97qvpfdxqd";
477     };
479     meta = with lib; {
480       description = "MPEG-TS Live Module";
481       homepage = "https://github.com/arut/nginx-ts-module";
482       license = with licenses; [ bsd2 ];
483       maintainers = [ ];
484     };
485   };
487   naxsi = {
488     name = "naxsi";
489     src = fetchFromGitHub {
490       name = "naxsi";
491       owner = "nbs-system";
492       repo = "naxsi";
493       rev = "95ac520eed2ea04098a76305fd0ad7e9158840b7";
494       sha256 = "0b5pnqkgg18kbw5rf2ifiq7lsx5rqmpqsql6hx5ycxjzxj6acfb3";
495     } + "/naxsi_src";
497     meta = with lib; {
498       description = "Open-source, high performance, low rules maintenance WAF";
499       homepage = "https://github.com/nbs-system/naxsi";
500       license = with licenses; [ gpl3 ];
501       maintainers = [ ];
502     };
503   };
505   njs = rec {
506     name = "njs";
507     src = fetchhg {
508       url = "https://hg.nginx.org/njs";
509       rev = "0.8.4";
510       sha256 = "sha256-SooPFx4WNEezPD+W/wmMLY+FdkGRoojLNUFbhn3Riyg=";
511       name = "nginx-njs";
512     };
514     # njs module sources have to be writable during nginx build, so we copy them
515     # to a temporary directory and change the module path in the configureFlags
516     preConfigure = ''
517       NJS_SOURCE_DIR=$(readlink -m "$TMPDIR/${src}")
518       mkdir -p "$(dirname "$NJS_SOURCE_DIR")"
519       cp --recursive "${src}" "$NJS_SOURCE_DIR"
520       chmod -R u+rwX,go+rX "$NJS_SOURCE_DIR"
521       export configureFlags="''${configureFlags/"${src}"/"$NJS_SOURCE_DIR/nginx"}"
522       unset NJS_SOURCE_DIR
523     '';
525     inputs = [ which ];
527     meta = with lib; {
528       description = "Subset of the JavaScript language that allows extending nginx functionality";
529       homepage = "https://nginx.org/en/docs/njs/";
530       license = with licenses; [ bsd2 ];
531       maintainers = [ ];
532     };
533   };
535   opentracing = {
536     name = "opentracing";
537     src =
538       let src' = fetchFromGitHub {
539         name = "opentracing";
540         owner = "opentracing-contrib";
541         repo = "nginx-opentracing";
542         rev = "v0.10.0";
543         sha256 = "1q234s3p55xv820207dnh4fcxkqikjcq5rs02ai31ylpmfsf0kkb";
544       };
545       in "${src'}/opentracing";
547     inputs = [ opentracing-cpp ];
549     meta = with lib; {
550       description = "Enable requests served by nginx for distributed tracing via The OpenTracing Project";
551       homepage = "https://github.com/opentracing-contrib/nginx-opentracing";
552       license = with licenses; [ asl20 ];
553       maintainers = [ ];
554     };
555   };
557   pagespeed = {
558     name = "pagespeed";
559     src = let
560       moduleSrc = fetchFromGitHub {
561         name = "pagespeed";
562         owner = "apache";
563         repo = "incubator-pagespeed-ngx";
564         rev = "v${psol.version}-stable";
565         sha256 = "0ry7vmkb2bx0sspl1kgjlrzzz6lbz07313ks2lr80rrdm2zb16wp";
566       };
567     in runCommand "ngx_pagespeed" {
568       meta = {
569         description = "PageSpeed module for Nginx";
570         homepage = "https://developers.google.com/speed/pagespeed/module/";
571         license = lib.licenses.asl20;
572       };
573     } ''
574       cp -r "${moduleSrc}" "$out"
575       chmod -R +w "$out"
576       ln -s "${psol}" "$out/psol"
577     '';
579     inputs = [ zlib libuuid ]; # psol deps
580     allowMemoryWriteExecute = true;
582     meta = with lib; {
583       description = "Automatic PageSpeed optimization";
584       homepage = "https://github.com/apache/incubator-pagespeed-ngx";
585       license = with licenses; [ asl20 ];
586       maintainers = [ ];
587     };
588   };
590   pam = {
591     name = "pam";
592     src = fetchFromGitHub {
593       name = "pam";
594       owner = "sto";
595       repo = "ngx_http_auth_pam_module";
596       rev = "v1.5.3";
597       sha256 = "sha256:09lnljdhjg65643bc4535z378lsn4llbq67zcxlln0pizk9y921a";
598     };
600     inputs = [ pam ];
602     meta = with lib; {
603       description = "Use PAM for simple http authentication";
604       homepage = "https://github.com/sto/ngx_http_auth_pam_module";
605       license = with licenses; [ bsd2 ];
606       maintainers = [ ];
607     };
608   };
610   pinba = {
611     name = "pinba";
612     src = fetchFromGitHub {
613       name = "pinba";
614       owner = "tony2001";
615       repo = "ngx_http_pinba_module";
616       rev = "28131255d4797a7e2f82a6a35cf9fc03c4678fe6";
617       sha256 = "00fii8bjvyipq6q47xhjhm3ylj4rhzmlk3qwxmfpdn37j7bc8p8c";
618     };
620     meta = with lib; {
621       description = "Pinba module for nginx";
622       homepage = "https://github.com/tony2001/ngx_http_pinba_module";
623       license = with licenses; [ unfree ]; # no license in repo
624       maintainers = [ ];
625     };
626   };
628   push-stream = {
629     name = "push-stream";
630     src = fetchFromGitHub {
631       name = "push-stream";
632       owner = "wandenberg";
633       repo = "nginx-push-stream-module";
634       rev = "1cdc01521ed44dc614ebb5c0d19141cf047e1f90";
635       sha256 = "0ijka32b37dl07k2jl48db5a32ix43jaczrpjih84cvq8yph0jjr";
636     };
638     meta = with lib; {
639       description = "Pure stream http push technology";
640       homepage = "https://github.com/wandenberg/nginx-push-stream-module";
641       license = with licenses; [ gpl3 ];
642       maintainers = [ ];
643     };
644   };
646   rtmp = {
647     name = "rtmp";
648     src = fetchFromGitHub {
649       name = "rtmp";
650       owner = "arut";
651       repo = "nginx-rtmp-module";
652       rev = "v1.2.2";
653       sha256 = "0y45bswk213yhkc2v1xca2rnsxrhx8v6azxz9pvi71vvxcggqv6h";
654     };
656     meta = with lib; {
657       description = "Media Streaming Server";
658       homepage = "https://github.com/arut/nginx-rtmp-module";
659       license = with licenses; [ bsd2 ];
660       maintainers = [ ];
661     };
662   };
664   secure-token = rec {
665     name = "secure-token";
666     version = "1.5";
667     src = fetchFromGitHub {
668       name = "secure-token";
669       owner = "kaltura";
670       repo = "nginx-secure-token-module";
671       rev = "refs/tags/${version}";
672       hash = "sha256-qYTjGS9pykRqMFmNls52YKxEdXYhHw+18YC2zzdjEpU=";
673     };
675     inputs = [ openssl ];
677     meta = with lib; {
678       description = "Generates CDN tokens, either as a cookie or as a query string parameter";
679       homepage = "https://github.com/kaltura/nginx-secure-token-module";
680       license = with licenses; [ agpl3Only ];
681       maintainers = [ ];
682     };
683   };
685   set-misc = {
686     name = "set-misc";
687     src = fetchFromGitHub {
688       name = "set-misc";
689       owner = "openresty";
690       repo = "set-misc-nginx-module";
691       rev = "v0.33";
692       hash = "sha256-jMMj3Ki1uSfQzagoB/O4NarxPjiaF9YRwjSKo+cgMxo=";
693     };
695     meta = with lib; {
696       description = "Various set_xxx directives added to the rewrite module (md5/sha1, sql/json quoting and many more)";
697       homepage = "https://github.com/openresty/set-misc-nginx-module";
698       license = with licenses; [ bsd2 ];
699       maintainers = [ ];
700     };
701   };
703   shibboleth = {
704     name = "shibboleth";
705     src = fetchFromGitHub {
706       name = "shibboleth";
707       owner = "nginx-shib";
708       repo = "nginx-http-shibboleth";
709       rev = "3f5ff4212fa12de23cb1acae8bf3a5a432b3f43b";
710       sha256 = "136zjipaz7iikgcgqwdv1mrh3ya996zyzbkdy6d4k07s2h9g7hy6";
711     };
713     meta = with lib; {
714       description = "Shibboleth auth request";
715       homepage = "https://github.com/nginx-shib/nginx-http-shibboleth";
716       license = with licenses; [ bsd2 ];
717       maintainers = [ ];
718     };
719   };
721   sla = {
722     name = "sla";
723     src = fetchFromGitHub {
724       name = "sla";
725       owner = "goldenclone";
726       repo = "nginx-sla";
727       rev = "7778f0125974befbc83751d0e1cadb2dcea57601";
728       sha256 = "1x5hm6r0dkm02ffny8kjd7mmq8przyd9amg2qvy5700x6lb63pbs";
729     };
731     meta = with lib; {
732       description = "Implements a collection of augmented statistics based on HTTP-codes and upstreams response time";
733       homepage = "https://github.com/goldenclone/nginx-sla";
734       license = with licenses; [ unfree ]; # no license in repo
735       maintainers = [ ];
736     };
737   };
739   slowfs-cache = {
740     name = "slowfs-cache";
741     src = fetchFromGitHub {
742       name = "slowfs-cache";
743       owner = "FRiCKLE";
744       repo = "ngx_slowfs_cache";
745       rev = "1.10";
746       sha256 = "1gyza02pcws3zqm1phv3ag50db5gnapxyjwy8skjmvawz7p5bmxr";
747     };
749     meta = with lib; {
750       description = "Adds ability to cache static files";
751       homepage = "https://github.com/friCKLE/ngx_slowfs_cache";
752       license = with licenses; [ bsd2 ];
753       maintainers = [ ];
754     };
755   };
757   sorted-querystring = {
758     name = "sorted-querystring";
759     src = fetchFromGitHub {
760       name = "sorted-querystring";
761       owner = "wandenberg";
762       repo = "nginx-sorted-querystring-module";
763       rev = "0.3";
764       sha256 = "0p6b0hcws39n27fx4xp9k4hb3pcv7b6kah4qqaj0pzjy3nbp4gj7";
765     };
767     meta = with lib; {
768       description = "Expose querystring parameters sorted in a variable";
769       homepage = "https://github.com/wandenberg/nginx-sorted-querystring-module";
770       license = with licenses; [ mit ];
771       maintainers = [ ];
772     };
773   };
775   spnego-http-auth = {
776     name = "spnego-http-auth";
777     src = fetchFromGitHub {
778       name = "spnego-http-auth";
779       owner = "stnoonan";
780       repo = "spnego-http-auth-nginx-module";
781       rev = "3575542b3147bd03a6c68a750c3662b0d72ed94e";
782       hash = "sha256-s0m5h7m7dsPD5o2SvBb9L2kB57jwXZK5SkdkGuOmlgs=";
783     };
785     inputs = [ libkrb5 ];
787     meta = with lib; {
788       description = "SPNEGO HTTP Authentication Module";
789       homepage = "https://github.com/stnoonan/spnego-http-auth-nginx-module";
790       license = with licenses; [ bsd2 ];
791       maintainers = teams.deshaw.members;
792     };
793   };
795   statsd = {
796     name = "statsd";
797     src = fetchFromGitHub {
798       name = "statsd";
799       owner = "harvesthq";
800       repo = "nginx-statsd";
801       rev = "b970e40467a624ba710c9a5106879a0554413d15";
802       sha256 = "1x8j4i1i2ahrr7qvz03vkldgdjdxi6mx75mzkfizfcc8smr4salr";
803     };
805     meta = with lib; {
806       description = "Send statistics to statsd";
807       homepage = "https://github.com/harvesthq/nginx-statsd";
808       license = with licenses; [ bsd3 ];
809       maintainers = [ ];
810     };
811   };
813   stream-sts = {
814     name = "stream-sts";
815     src = fetchFromGitHub {
816       name = "stream-sts";
817       owner = "vozlt";
818       repo = "nginx-module-stream-sts";
819       rev = "v0.1.1";
820       sha256 = "1jdj1kik6l3rl9nyx61xkqk7hmqbncy0rrqjz3dmjqsz92y8zaya";
821     };
823     meta = with lib; {
824       description = "Stream server traffic status core module";
825       homepage = "https://github.com/vozlt/nginx-module-stream-sts";
826       license = with licenses; [ bsd2 ];
827       maintainers = [ ];
828     };
829   };
831   sts = {
832     name = "sts";
833     src = fetchFromGitHub {
834       name = "sts";
835       owner = "vozlt";
836       repo = "nginx-module-sts";
837       rev = "v0.1.1";
838       sha256 = "0nvb29641x1i7mdbydcny4qwlvdpws38xscxirajd2x7nnfdflrk";
839     };
841     meta = with lib; {
842       description = "Stream server traffic status module";
843       homepage = "https://github.com/vozlt/nginx-module-sts";
844       license = with licenses; [ bsd2 ];
845       maintainers = [ ];
846     };
847   };
849   subsFilter = {
850     name = "subsFilter";
851     src = fetchFromGitHub {
852       name = "subsFilter";
853       owner = "yaoweibin";
854       repo = "ngx_http_substitutions_filter_module";
855       rev = "e12e965ac1837ca709709f9a26f572a54d83430e";
856       sha256 = "sha256-3sWgue6QZYwK69XSi9q8r3WYGVyMCIgfqqLvPBHqJKU=";
857     };
859     meta = with lib; {
860       description = "Filter module which can do both regular expression and fixed string substitutions";
861       homepage = "https://github.com/yaoweibin/ngx_http_substitutions_filter_module";
862       license = with licenses; [ bsd2 ];
863       maintainers = [ ];
864     };
865   };
867   sysguard = {
868     name = "sysguard";
869     src = fetchFromGitHub {
870       name = "sysguard";
871       owner = "vozlt";
872       repo = "nginx-module-sysguard";
873       rev = "e512897f5aba4f79ccaeeebb51138f1704a58608";
874       sha256 = "19c6w6wscbq9phnx7vzbdf4ay6p2ys0g7kp2rmc9d4fb53phrhfx";
875     };
877     meta = with lib; {
878       description = "Nginx sysguard module";
879       homepage = "https://github.com/vozlt/nginx-module-sysguard";
880       license = with licenses; [ bsd2 ];
881       maintainers = [ ];
882     };
883   };
885   upload = {
886     name = "upload";
887     src = fetchFromGitHub {
888       name = "upload";
889       owner = "fdintino";
890       repo = "nginx-upload-module";
891       rev = "2.3.0";
892       sha256 = "8veZP516oC7TESO368ZsZreetbDt+1eTcamk7P1kWjU=";
893     };
895     meta = with lib; {
896       description = "Handle file uploads using multipart/form-data encoding and resumable uploads";
897       homepage = "https://github.com/fdintino/nginx-upload-module";
898       license = with licenses; [ bsd3 ];
899       maintainers = [ ];
900     };
901   };
903   upstream-check = {
904     name = "upstream-check";
905     src = fetchFromGitHub {
906       name = "upstream-check";
907       owner = "yaoweibin";
908       repo = "nginx_upstream_check_module";
909       rev = "e538034b6ad7992080d2403d6d3da56e4f7ac01e";
910       sha256 = "06y7k04072xzqyqyb08m0vaaizkp4rfwm0q7i735imbzw2rxb74l";
911     };
913     meta = with lib; {
914       description = "Support upstream health check";
915       homepage = "https://github.com/yaoweibin/nginx_upstream_check_module";
916       license = with licenses; [ bsd2 ];
917       maintainers = [ ];
918     };
919   };
921   upstream-tarantool = {
922     name = "upstream-tarantool";
923     src = fetchFromGitHub {
924       name = "upstream-tarantool";
925       owner = "tarantool";
926       repo = "nginx_upstream_module";
927       rev = "v2.7.1";
928       sha256 = "0ya4330in7zjzqw57djv4icpk0n1j98nvf0f8v296yi9rjy054br";
929     };
931     inputs = [ msgpuck.dev yajl ];
933     meta = with lib; {
934       description = "Tarantool NginX upstream module (REST, JSON API, websockets, load balancing)";
935       homepage = "https://github.com/tarantool/nginx_upstream_module";
936       license = with licenses; [ bsd2 ];
937       maintainers = [ ];
938     };
939   };
941   url = {
942     name = "url";
943     src = fetchFromGitHub {
944       name = "url";
945       owner = "vozlt";
946       repo = "nginx-module-url";
947       rev = "9299816ca6bc395625c3683fbd2aa7b916bfe91e";
948       sha256 = "0mk1gjmfnry6hgdsnlavww9bn7223idw50jlkhh5k00q5509w4ip";
949     };
951     meta = with lib; {
952       description = "URL encoding converting module";
953       homepage = "https://github.com/vozlt/nginx-module-url";
954       license = with licenses; [ bsd2 ];
955       maintainers = [ ];
956     };
957   };
959   video-thumbextractor = rec {
960     name = "video-thumbextractor";
961     version = "1.0.0";
962     src = fetchFromGitHub {
963       name = "video-thumbextractor";
964       owner = "wandenberg";
965       repo = "nginx-video-thumbextractor-module";
966       rev = "refs/tags/${version}";
967       hash = "sha256-F2cuzCbJdGYX0Zmz9MSXTB7x8+FBR6pPpXtLlDRCcj8=";
968     };
970     inputs = [ ffmpeg-headless libjpeg ];
972     meta = with lib; {
973       description = "Extract thumbs from a video file";
974       homepage = "https://github.com/wandenberg/nginx-video-thumbextractor-module";
975       license = with licenses; [ gpl3 ];
976       maintainers = [ ];
977     };
978   };
980   vod = {
981     name = "vod";
982     src = fetchFromGitHub {
983       name = "vod";
984       owner = "kaltura";
985       repo = "nginx-vod-module";
986       rev = "1.33";
987       hash = "sha256-xcdbaogJV/vSzFfP55uK2+zw3zF5j9AHaJI0QItTSss=";
988       postFetch = ''
989         substituteInPlace $out/vod/media_set.h \
990           --replace "MAX_CLIPS (128)" "MAX_CLIPS (1024)"
991       '';
992     };
994     inputs = [ ffmpeg_6-headless fdk_aac openssl libxml2 libiconv ];
996     meta = with lib; {
997       description = "VOD packager";
998       homepage = "https://github.com/kaltura/nginx-vod-module";
999       license = with licenses; [ agpl3Only ];
1000       maintainers = [ ];
1001     };
1002   };
1004   vts = {
1005     name = "vts";
1006     src = fetchFromGitHub {
1007       name = "vts";
1008       owner = "vozlt";
1009       repo = "nginx-module-vts";
1010       rev = "v0.2.2";
1011       sha256 = "sha256-ReTmYGVSOwtnYDMkQDMWwxw09vT4iHYfYZvgd8iBotk=";
1012     };
1014     meta = with lib; {
1015       description = "Virtual host traffic status module";
1016       homepage = "https://github.com/vozlt/nginx-module-vts";
1017       license = with licenses; [ bsd2 ];
1018       maintainers = with maintainers; [ SuperSandro2000 ];
1019     };
1020   };
1022   zstd = {
1023     name = "zstd";
1024     src = fetchFromGitHub {
1025       name = "zstd";
1026       owner = "tokers";
1027       repo = "zstd-nginx-module";
1028       rev = "0.1.1";
1029       hash = "sha256-1gCV7uUsuYnZfb9e8VfjWkUloVINOUH5qzeJ03kIHgs=";
1030     };
1032     inputs = [ zstd ];
1034     meta = with lib; {
1035       description = "Nginx modules for the Zstandard compression";
1036       homepage = "https://github.com/tokers/zstd-nginx-module";
1037       license = with licenses; [ bsd2 ];
1038       maintainers = with maintainers; [ SuperSandro2000 ];
1039     };
1040   };
1041 }; in self // lib.optionalAttrs config.allowAliases {
1042   # deprecated or renamed packages
1043   modsecurity-nginx = self.modsecurity;
1044   fastcgi-cache-purge = throw "fastcgi-cache-purge was renamed to cache-purge";
1045   ngx_aws_auth = throw "ngx_aws_auth was renamed to aws-auth";