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