Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 1118 lines 32 kB view raw
1{ 2 lib, 3 config, 4 nixosTests, 5 fetchFromGitHub, 6 fetchFromGitLab, 7 fetchhg, 8 runCommand, 9 stdenv, 10 11 arpa2common, 12 brotli, 13 curl, 14 expat, 15 fdk_aac, 16 ffmpeg-headless, 17 ffmpeg_6-headless, 18 geoip, 19 libbsd, 20 libiconv, 21 libjpeg, 22 libkrb5, 23 libmaxminddb, 24 libmodsecurity, 25 libuuid, 26 libxml2, 27 lmdb, 28 luajit_openresty, 29 msgpuck, 30 openssl, 31 opentracing-cpp, 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 = with lib; { 58 description = "Forward proxy module for CONNECT request handling"; 59 homepage = "https://github.com/chobits/ngx_http_proxy_connect_module"; 60 license = with 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 = with lib; { 82 description = "Validates Akamai v2 query string tokens"; 83 homepage = "https://github.com/kaltura/nginx-akamai-token-validate-module"; 84 license = with 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 = with lib; { 113 description = "Integrate ARPA2 Resource ACLs into nginx"; 114 homepage = "https://gitlab.com/arpa2/nginx-auth-a2aclr"; 115 license = with 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 = with lib; { 131 description = "Proxy to authenticated AWS services"; 132 homepage = "https://github.com/anomalizer/ngx_aws_auth"; 133 license = with 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 = with lib; { 159 description = "Brotli compression"; 160 homepage = "https://github.com/google/ngx_brotli"; 161 license = with 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 = with lib; { 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 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 = with lib; { 195 description = "Collection of small and useful nginx add-ons"; 196 homepage = "https://github.com/FRiCKLE/ngx_coolkit"; 197 license = with 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 = with lib; { 215 description = "WebDAV PROPFIND,OPTIONS,LOCK,UNLOCK support"; 216 homepage = "https://github.com/arut/nginx-dav-ext-module"; 217 license = with 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 = with lib; { 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 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 = with lib; { 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 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 = with lib; { 271 description = "Fancy indexes module"; 272 homepage = "https://github.com/aperezdc/ngx-fancyindex"; 273 license = with licenses; [ bsd2 ]; 274 maintainers = with 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 = with lib; { 289 description = "Fluentd data collector"; 290 homepage = "https://github.com/fluent/nginx-fluentd-module"; 291 license = with 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 = with lib; { 309 description = "Creates variables with values from the maxmind geoip2 databases"; 310 homepage = "https://github.com/leev/ngx_http_geoip2_module"; 311 license = with licenses; [ bsd2 ]; 312 maintainers = with 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 = with lib; { 343 description = "IP address anonymizer"; 344 homepage = "https://github.com/masonicboom/ipscrub"; 345 license = with 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 = with lib; { 361 description = "Limit the total speed from the specific user"; 362 homepage = "https://github.com/yaoweibin/nginx_limit_speed_module"; 363 license = with 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 = with lib; { 379 description = "HTTP live module"; 380 homepage = "https://github.com/arut/nginx-live-module"; 381 license = with licenses; [ bsd2 ]; 382 maintainers = [ ]; 383 }; 384 }; 385 386 lua = rec { 387 name = "lua"; 388 version = "0.10.26"; 389 390 src = fetchFromGitHub { 391 name = "lua"; 392 owner = "openresty"; 393 repo = "lua-nginx-module"; 394 rev = "v${version}"; 395 hash = "sha256-007up/XncaSBimBumHpbwgB1WnkXgBe8e/q/yT6vthI="; 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 = with lib; { 415 description = "Embed the Power of Lua"; 416 homepage = "https://github.com/openresty/lua-nginx-module"; 417 license = with 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 = with lib; { 436 description = "Expose Lua API to ngx_lua for Nginx upstreams"; 437 homepage = "https://github.com/openresty/lua-upstream-nginx-module"; 438 license = with 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 = with lib; { 464 description = "Open source, cross platform web application firewall (WAF)"; 465 homepage = "https://github.com/SpiderLabs/ModSecurity"; 466 license = with 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 = with lib; { 482 description = "Set, add, and clear arbitrary output headers"; 483 homepage = "https://github.com/openresty/headers-more-nginx-module"; 484 license = with licenses; [ bsd2 ]; 485 maintainers = with 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 = with lib; { 500 description = "MPEG-TS Live Module"; 501 homepage = "https://github.com/arut/nginx-ts-module"; 502 license = with 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 = with lib; { 520 description = "Open-source, high performance, low rules maintenance WAF"; 521 homepage = "https://github.com/nbs-system/naxsi"; 522 license = with licenses; [ gpl3 ]; 523 maintainers = [ ]; 524 }; 525 }; 526 527 njs = rec { 528 name = "njs"; 529 src = fetchFromGitHub { 530 owner = "nginx"; 531 repo = "njs"; 532 rev = "0.8.9"; 533 hash = "sha256-TalS9EJP+vB1o3BKaTvXXnudjKhNOcob3kDAyeKej3c="; 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 = with lib; { 555 description = "Subset of the JavaScript language that allows extending nginx functionality"; 556 homepage = "https://nginx.org/en/docs/njs/"; 557 license = with licenses; [ bsd2 ]; 558 maintainers = with maintainers; [ jvanbruegge ]; 559 }; 560 }; 561 562 opentracing = { 563 name = "opentracing"; 564 src = 565 let 566 src' = fetchFromGitHub { 567 name = "opentracing"; 568 owner = "opentracing-contrib"; 569 repo = "nginx-opentracing"; 570 rev = "v0.10.0"; 571 sha256 = "1q234s3p55xv820207dnh4fcxkqikjcq5rs02ai31ylpmfsf0kkb"; 572 }; 573 in 574 "${src'}/opentracing"; 575 576 inputs = [ opentracing-cpp ]; 577 578 meta = with lib; { 579 description = "Enable requests served by nginx for distributed tracing via The OpenTracing Project"; 580 homepage = "https://github.com/opentracing-contrib/nginx-opentracing"; 581 license = with licenses; [ asl20 ]; 582 maintainers = [ ]; 583 }; 584 }; 585 586 pagespeed = { 587 name = "pagespeed"; 588 src = 589 let 590 moduleSrc = fetchFromGitHub { 591 name = "pagespeed"; 592 owner = "apache"; 593 repo = "incubator-pagespeed-ngx"; 594 rev = "v${psol.version}-stable"; 595 sha256 = "0ry7vmkb2bx0sspl1kgjlrzzz6lbz07313ks2lr80rrdm2zb16wp"; 596 }; 597 in 598 runCommand "ngx_pagespeed" 599 { 600 meta = { 601 description = "PageSpeed module for Nginx"; 602 homepage = "https://developers.google.com/speed/pagespeed/module/"; 603 license = lib.licenses.asl20; 604 }; 605 } 606 '' 607 cp -r "${moduleSrc}" "$out" 608 chmod -R +w "$out" 609 ln -s "${psol}" "$out/psol" 610 ''; 611 612 inputs = [ 613 zlib 614 libuuid 615 ]; # psol deps 616 allowMemoryWriteExecute = true; 617 618 meta = with lib; { 619 description = "Automatic PageSpeed optimization"; 620 homepage = "https://github.com/apache/incubator-pagespeed-ngx"; 621 license = with licenses; [ asl20 ]; 622 maintainers = [ ]; 623 }; 624 }; 625 626 pam = { 627 name = "pam"; 628 src = fetchFromGitHub { 629 name = "pam"; 630 owner = "sto"; 631 repo = "ngx_http_auth_pam_module"; 632 rev = "v1.5.3"; 633 sha256 = "sha256:09lnljdhjg65643bc4535z378lsn4llbq67zcxlln0pizk9y921a"; 634 }; 635 636 inputs = [ pam ]; 637 638 meta = with lib; { 639 description = "Use PAM for simple http authentication"; 640 homepage = "https://github.com/sto/ngx_http_auth_pam_module"; 641 license = with licenses; [ bsd2 ]; 642 maintainers = [ ]; 643 }; 644 }; 645 646 pinba = { 647 name = "pinba"; 648 src = fetchFromGitHub { 649 name = "pinba"; 650 owner = "tony2001"; 651 repo = "ngx_http_pinba_module"; 652 rev = "28131255d4797a7e2f82a6a35cf9fc03c4678fe6"; 653 sha256 = "00fii8bjvyipq6q47xhjhm3ylj4rhzmlk3qwxmfpdn37j7bc8p8c"; 654 }; 655 656 meta = with lib; { 657 description = "Pinba module for nginx"; 658 homepage = "https://github.com/tony2001/ngx_http_pinba_module"; 659 license = with licenses; [ unfree ]; # no license in repo 660 maintainers = [ ]; 661 }; 662 }; 663 664 push-stream = { 665 name = "push-stream"; 666 src = fetchFromGitHub { 667 name = "push-stream"; 668 owner = "wandenberg"; 669 repo = "nginx-push-stream-module"; 670 rev = "1cdc01521ed44dc614ebb5c0d19141cf047e1f90"; 671 sha256 = "0ijka32b37dl07k2jl48db5a32ix43jaczrpjih84cvq8yph0jjr"; 672 }; 673 674 meta = with lib; { 675 description = "Pure stream http push technology"; 676 homepage = "https://github.com/wandenberg/nginx-push-stream-module"; 677 license = with licenses; [ gpl3 ]; 678 maintainers = [ ]; 679 }; 680 }; 681 682 rtmp = { 683 name = "rtmp"; 684 src = fetchFromGitHub { 685 name = "rtmp"; 686 owner = "arut"; 687 repo = "nginx-rtmp-module"; 688 rev = "v1.2.2"; 689 sha256 = "0y45bswk213yhkc2v1xca2rnsxrhx8v6azxz9pvi71vvxcggqv6h"; 690 }; 691 692 meta = with lib; { 693 description = "Media Streaming Server"; 694 homepage = "https://github.com/arut/nginx-rtmp-module"; 695 license = with licenses; [ bsd2 ]; 696 maintainers = [ ]; 697 }; 698 }; 699 700 secure-token = rec { 701 name = "secure-token"; 702 version = "1.5"; 703 src = fetchFromGitHub { 704 name = "secure-token"; 705 owner = "kaltura"; 706 repo = "nginx-secure-token-module"; 707 rev = "refs/tags/${version}"; 708 hash = "sha256-qYTjGS9pykRqMFmNls52YKxEdXYhHw+18YC2zzdjEpU="; 709 }; 710 711 inputs = [ openssl ]; 712 713 meta = with lib; { 714 description = "Generates CDN tokens, either as a cookie or as a query string parameter"; 715 homepage = "https://github.com/kaltura/nginx-secure-token-module"; 716 license = with licenses; [ agpl3Only ]; 717 maintainers = [ ]; 718 }; 719 }; 720 721 set-misc = { 722 name = "set-misc"; 723 src = fetchFromGitHub { 724 name = "set-misc"; 725 owner = "openresty"; 726 repo = "set-misc-nginx-module"; 727 rev = "v0.33"; 728 hash = "sha256-jMMj3Ki1uSfQzagoB/O4NarxPjiaF9YRwjSKo+cgMxo="; 729 }; 730 731 meta = with lib; { 732 description = "Various set_xxx directives added to the rewrite module (md5/sha1, sql/json quoting and many more)"; 733 homepage = "https://github.com/openresty/set-misc-nginx-module"; 734 license = with licenses; [ bsd2 ]; 735 maintainers = [ ]; 736 }; 737 }; 738 739 shibboleth = { 740 name = "shibboleth"; 741 src = fetchFromGitHub { 742 name = "shibboleth"; 743 owner = "nginx-shib"; 744 repo = "nginx-http-shibboleth"; 745 rev = "3f5ff4212fa12de23cb1acae8bf3a5a432b3f43b"; 746 sha256 = "136zjipaz7iikgcgqwdv1mrh3ya996zyzbkdy6d4k07s2h9g7hy6"; 747 }; 748 749 meta = with lib; { 750 description = "Shibboleth auth request"; 751 homepage = "https://github.com/nginx-shib/nginx-http-shibboleth"; 752 license = with licenses; [ bsd2 ]; 753 maintainers = [ ]; 754 }; 755 }; 756 757 sla = { 758 name = "sla"; 759 src = fetchFromGitHub { 760 name = "sla"; 761 owner = "goldenclone"; 762 repo = "nginx-sla"; 763 rev = "7778f0125974befbc83751d0e1cadb2dcea57601"; 764 sha256 = "1x5hm6r0dkm02ffny8kjd7mmq8przyd9amg2qvy5700x6lb63pbs"; 765 }; 766 767 meta = with lib; { 768 description = "Implements a collection of augmented statistics based on HTTP-codes and upstreams response time"; 769 homepage = "https://github.com/goldenclone/nginx-sla"; 770 license = with licenses; [ unfree ]; # no license in repo 771 maintainers = [ ]; 772 }; 773 }; 774 775 slowfs-cache = { 776 name = "slowfs-cache"; 777 src = fetchFromGitHub { 778 name = "slowfs-cache"; 779 owner = "FRiCKLE"; 780 repo = "ngx_slowfs_cache"; 781 rev = "1.10"; 782 sha256 = "1gyza02pcws3zqm1phv3ag50db5gnapxyjwy8skjmvawz7p5bmxr"; 783 }; 784 785 meta = with lib; { 786 description = "Adds ability to cache static files"; 787 homepage = "https://github.com/friCKLE/ngx_slowfs_cache"; 788 license = with licenses; [ bsd2 ]; 789 maintainers = [ ]; 790 }; 791 }; 792 793 sorted-querystring = { 794 name = "sorted-querystring"; 795 src = fetchFromGitHub { 796 name = "sorted-querystring"; 797 owner = "wandenberg"; 798 repo = "nginx-sorted-querystring-module"; 799 rev = "0.3"; 800 sha256 = "0p6b0hcws39n27fx4xp9k4hb3pcv7b6kah4qqaj0pzjy3nbp4gj7"; 801 }; 802 803 meta = with lib; { 804 description = "Expose querystring parameters sorted in a variable"; 805 homepage = "https://github.com/wandenberg/nginx-sorted-querystring-module"; 806 license = with licenses; [ mit ]; 807 maintainers = [ ]; 808 }; 809 }; 810 811 spnego-http-auth = { 812 name = "spnego-http-auth"; 813 src = fetchFromGitHub { 814 name = "spnego-http-auth"; 815 owner = "stnoonan"; 816 repo = "spnego-http-auth-nginx-module"; 817 rev = "3575542b3147bd03a6c68a750c3662b0d72ed94e"; 818 hash = "sha256-s0m5h7m7dsPD5o2SvBb9L2kB57jwXZK5SkdkGuOmlgs="; 819 }; 820 821 inputs = [ libkrb5 ]; 822 823 meta = with lib; { 824 description = "SPNEGO HTTP Authentication Module"; 825 homepage = "https://github.com/stnoonan/spnego-http-auth-nginx-module"; 826 license = with licenses; [ bsd2 ]; 827 teams = [ teams.deshaw ]; 828 }; 829 }; 830 831 statsd = { 832 name = "statsd"; 833 src = fetchFromGitHub { 834 name = "statsd"; 835 owner = "harvesthq"; 836 repo = "nginx-statsd"; 837 rev = "b970e40467a624ba710c9a5106879a0554413d15"; 838 sha256 = "1x8j4i1i2ahrr7qvz03vkldgdjdxi6mx75mzkfizfcc8smr4salr"; 839 }; 840 841 meta = with lib; { 842 description = "Send statistics to statsd"; 843 homepage = "https://github.com/harvesthq/nginx-statsd"; 844 license = with licenses; [ bsd3 ]; 845 maintainers = [ ]; 846 }; 847 }; 848 849 stream-sts = { 850 name = "stream-sts"; 851 src = fetchFromGitHub { 852 name = "stream-sts"; 853 owner = "vozlt"; 854 repo = "nginx-module-stream-sts"; 855 rev = "v0.1.1"; 856 sha256 = "1jdj1kik6l3rl9nyx61xkqk7hmqbncy0rrqjz3dmjqsz92y8zaya"; 857 }; 858 859 meta = with lib; { 860 description = "Stream server traffic status core module"; 861 homepage = "https://github.com/vozlt/nginx-module-stream-sts"; 862 license = with licenses; [ bsd2 ]; 863 maintainers = [ ]; 864 }; 865 }; 866 867 sts = { 868 name = "sts"; 869 src = fetchFromGitHub { 870 name = "sts"; 871 owner = "vozlt"; 872 repo = "nginx-module-sts"; 873 rev = "v0.1.1"; 874 sha256 = "0nvb29641x1i7mdbydcny4qwlvdpws38xscxirajd2x7nnfdflrk"; 875 }; 876 877 meta = with lib; { 878 description = "Stream server traffic status module"; 879 homepage = "https://github.com/vozlt/nginx-module-sts"; 880 license = with licenses; [ bsd2 ]; 881 maintainers = [ ]; 882 }; 883 }; 884 885 subsFilter = { 886 name = "subsFilter"; 887 src = fetchFromGitHub { 888 name = "subsFilter"; 889 owner = "yaoweibin"; 890 repo = "ngx_http_substitutions_filter_module"; 891 rev = "e12e965ac1837ca709709f9a26f572a54d83430e"; 892 sha256 = "sha256-3sWgue6QZYwK69XSi9q8r3WYGVyMCIgfqqLvPBHqJKU="; 893 }; 894 895 meta = with lib; { 896 description = "Filter module which can do both regular expression and fixed string substitutions"; 897 homepage = "https://github.com/yaoweibin/ngx_http_substitutions_filter_module"; 898 license = with licenses; [ bsd2 ]; 899 maintainers = [ ]; 900 }; 901 }; 902 903 sysguard = { 904 name = "sysguard"; 905 src = fetchFromGitHub { 906 name = "sysguard"; 907 owner = "vozlt"; 908 repo = "nginx-module-sysguard"; 909 rev = "e512897f5aba4f79ccaeeebb51138f1704a58608"; 910 sha256 = "19c6w6wscbq9phnx7vzbdf4ay6p2ys0g7kp2rmc9d4fb53phrhfx"; 911 }; 912 913 meta = with lib; { 914 description = "Nginx sysguard module"; 915 homepage = "https://github.com/vozlt/nginx-module-sysguard"; 916 license = with licenses; [ bsd2 ]; 917 maintainers = [ ]; 918 }; 919 }; 920 921 upload = { 922 name = "upload"; 923 src = fetchFromGitHub { 924 name = "upload"; 925 owner = "fdintino"; 926 repo = "nginx-upload-module"; 927 rev = "2.3.0"; 928 sha256 = "8veZP516oC7TESO368ZsZreetbDt+1eTcamk7P1kWjU="; 929 }; 930 931 meta = with lib; { 932 description = "Handle file uploads using multipart/form-data encoding and resumable uploads"; 933 homepage = "https://github.com/fdintino/nginx-upload-module"; 934 license = with licenses; [ bsd3 ]; 935 maintainers = [ ]; 936 }; 937 }; 938 939 upstream-check = { 940 name = "upstream-check"; 941 src = fetchFromGitHub { 942 name = "upstream-check"; 943 owner = "yaoweibin"; 944 repo = "nginx_upstream_check_module"; 945 rev = "e538034b6ad7992080d2403d6d3da56e4f7ac01e"; 946 sha256 = "06y7k04072xzqyqyb08m0vaaizkp4rfwm0q7i735imbzw2rxb74l"; 947 }; 948 949 meta = with lib; { 950 description = "Support upstream health check"; 951 homepage = "https://github.com/yaoweibin/nginx_upstream_check_module"; 952 license = with licenses; [ bsd2 ]; 953 maintainers = [ ]; 954 }; 955 }; 956 957 upstream-tarantool = { 958 name = "upstream-tarantool"; 959 src = fetchFromGitHub { 960 name = "upstream-tarantool"; 961 owner = "tarantool"; 962 repo = "nginx_upstream_module"; 963 rev = "v2.7.1"; 964 sha256 = "0ya4330in7zjzqw57djv4icpk0n1j98nvf0f8v296yi9rjy054br"; 965 }; 966 967 inputs = [ 968 msgpuck.dev 969 yajl 970 ]; 971 972 meta = with lib; { 973 description = "Tarantool NginX upstream module (REST, JSON API, websockets, load balancing)"; 974 homepage = "https://github.com/tarantool/nginx_upstream_module"; 975 license = with licenses; [ bsd2 ]; 976 maintainers = [ ]; 977 }; 978 }; 979 980 url = { 981 name = "url"; 982 src = fetchFromGitHub { 983 name = "url"; 984 owner = "vozlt"; 985 repo = "nginx-module-url"; 986 rev = "9299816ca6bc395625c3683fbd2aa7b916bfe91e"; 987 sha256 = "0mk1gjmfnry6hgdsnlavww9bn7223idw50jlkhh5k00q5509w4ip"; 988 }; 989 990 meta = with lib; { 991 description = "URL encoding converting module"; 992 homepage = "https://github.com/vozlt/nginx-module-url"; 993 license = with licenses; [ bsd2 ]; 994 maintainers = [ ]; 995 }; 996 }; 997 998 video-thumbextractor = rec { 999 name = "video-thumbextractor"; 1000 version = "1.0.0"; 1001 src = fetchFromGitHub { 1002 name = "video-thumbextractor"; 1003 owner = "wandenberg"; 1004 repo = "nginx-video-thumbextractor-module"; 1005 rev = "refs/tags/${version}"; 1006 hash = "sha256-F2cuzCbJdGYX0Zmz9MSXTB7x8+FBR6pPpXtLlDRCcj8="; 1007 }; 1008 1009 inputs = [ 1010 ffmpeg-headless 1011 libjpeg 1012 ]; 1013 1014 meta = with lib; { 1015 description = "Extract thumbs from a video file"; 1016 homepage = "https://github.com/wandenberg/nginx-video-thumbextractor-module"; 1017 license = with licenses; [ gpl3 ]; 1018 maintainers = [ ]; 1019 }; 1020 }; 1021 1022 vod = { 1023 name = "vod"; 1024 src = fetchFromGitHub { 1025 name = "vod"; 1026 owner = "kaltura"; 1027 repo = "nginx-vod-module"; 1028 rev = "1.33"; 1029 hash = "sha256-pForXU1VBxa4F3F7xK+DJtMKC4wgcykJImlQjxz5GnE="; 1030 postFetch = '' 1031 substituteInPlace $out/vod/media_set.h \ 1032 --replace "MAX_CLIPS (128)" "MAX_CLIPS (1024)" 1033 substituteInPlace $out/vod/subtitle/dfxp_format.c \ 1034 --replace-fail '(!ctxt->wellFormed && !ctxt->recovery))' '!ctxt->wellFormed)' 1035 ''; 1036 }; 1037 1038 inputs = [ 1039 ffmpeg_6-headless 1040 fdk_aac 1041 openssl 1042 libxml2 1043 libiconv 1044 ]; 1045 1046 meta = with lib; { 1047 description = "VOD packager"; 1048 homepage = "https://github.com/kaltura/nginx-vod-module"; 1049 license = with licenses; [ agpl3Only ]; 1050 maintainers = [ ]; 1051 }; 1052 }; 1053 1054 vts = { 1055 name = "vts"; 1056 src = fetchFromGitHub { 1057 name = "vts"; 1058 owner = "vozlt"; 1059 repo = "nginx-module-vts"; 1060 rev = "v0.2.2"; 1061 sha256 = "sha256-ReTmYGVSOwtnYDMkQDMWwxw09vT4iHYfYZvgd8iBotk="; 1062 }; 1063 1064 meta = with lib; { 1065 description = "Virtual host traffic status module"; 1066 homepage = "https://github.com/vozlt/nginx-module-vts"; 1067 license = with licenses; [ bsd2 ]; 1068 maintainers = with maintainers; [ SuperSandro2000 ]; 1069 }; 1070 }; 1071 1072 zip = { 1073 name = "zip"; 1074 src = fetchFromGitHub { 1075 name = "zip"; 1076 owner = "evanmiller"; 1077 repo = "mod_zip"; 1078 rev = "8e65b82c82c7890f67a6107271c127e9881b6313"; 1079 hash = "sha256-2bUyGsLSaomzaijnAcHQV9TNSuV7Z3G9EUbrZzLG+mk="; 1080 }; 1081 1082 meta = with lib; { 1083 description = "Streaming ZIP archiver for nginx"; 1084 homepage = "https://github.com/evanmiller/mod_zip"; 1085 license = with licenses; [ bsd3 ]; 1086 broken = stdenv.hostPlatform.isDarwin; 1087 teams = [ teams.apm ]; 1088 }; 1089 }; 1090 1091 zstd = { 1092 name = "zstd"; 1093 src = fetchFromGitHub { 1094 name = "zstd"; 1095 owner = "tokers"; 1096 repo = "zstd-nginx-module"; 1097 rev = "f4ba115e0b0eaecde545e5f37db6aa18917d8f4b"; 1098 hash = "sha256-N8D3KRpd79O8sdlPngtK9Ii7XT2imS4F+nkqsHMHw/w="; 1099 }; 1100 1101 inputs = [ zstd ]; 1102 1103 meta = with lib; { 1104 description = "Nginx modules for the Zstandard compression"; 1105 homepage = "https://github.com/tokers/zstd-nginx-module"; 1106 license = with licenses; [ bsd2 ]; 1107 maintainers = with maintainers; [ SuperSandro2000 ]; 1108 }; 1109 }; 1110 }; 1111in 1112self 1113// lib.optionalAttrs config.allowAliases { 1114 # deprecated or renamed packages 1115 modsecurity-nginx = self.modsecurity; 1116 fastcgi-cache-purge = throw "fastcgi-cache-purge was renamed to cache-purge"; 1117 ngx_aws_auth = throw "ngx_aws_auth was renamed to aws-auth"; 1118}