From af57e642d8b9d99f65ba39aa0387b11b9d8132c4 Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Thu, 1 Jan 2026 16:27:09 -0500 Subject: [PATCH 1/2] nginxModules.vod: cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Prefer applyPatches over postFetch; one of the two is needed due to how nginx modules are built; postFetch is less preferred as it is easy to “mess up” by forgetting to update the hash. - Prefer `tag` over `rev` when using a tag. - Update deprecated `--replace` -> `--replace-fail`. --- pkgs/servers/http/nginx/modules.nix | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/pkgs/servers/http/nginx/modules.nix b/pkgs/servers/http/nginx/modules.nix index 439306eaad26..8d02ddf38bb9 100644 --- a/pkgs/servers/http/nginx/modules.nix +++ b/pkgs/servers/http/nginx/modules.nix @@ -2,6 +2,7 @@ lib, config, nixosTests, + applyPatches, fetchFromGitHub, fetchFromGitLab, fetchhg, @@ -996,16 +997,18 @@ let vod = { name = "vod"; - src = fetchFromGitHub { + src = applyPatches { name = "vod"; - owner = "kaltura"; - repo = "nginx-vod-module"; - rev = "1.33"; - hash = "sha256-pForXU1VBxa4F3F7xK+DJtMKC4wgcykJImlQjxz5GnE="; - postFetch = '' - substituteInPlace $out/vod/media_set.h \ - --replace "MAX_CLIPS (128)" "MAX_CLIPS (1024)" - substituteInPlace $out/vod/subtitle/dfxp_format.c \ + src = fetchFromGitHub { + owner = "kaltura"; + repo = "nginx-vod-module"; + tag = "1.33"; + hash = "sha256-hf4iprkdNP7lVlrm/7kMkrp/8440PuTZiL1hv/Icfm4="; + }; + postPatch = '' + substituteInPlace vod/media_set.h \ + --replace-fail "MAX_CLIPS (128)" "MAX_CLIPS (1024)" + substituteInPlace vod/subtitle/dfxp_format.c \ --replace-fail '(!ctxt->wellFormed && !ctxt->recovery))' '!ctxt->wellFormed)' ''; }; From 1e8a2bf1b80626b14929d84d95b2e54e9fa16fc8 Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Thu, 1 Jan 2026 16:34:55 -0500 Subject: [PATCH 2/2] nginxModules.vod: fix build with gcc 15 --- pkgs/servers/http/nginx/modules.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/servers/http/nginx/modules.nix b/pkgs/servers/http/nginx/modules.nix index 8d02ddf38bb9..8b558dcb85e8 100644 --- a/pkgs/servers/http/nginx/modules.nix +++ b/pkgs/servers/http/nginx/modules.nix @@ -1010,6 +1010,9 @@ let --replace-fail "MAX_CLIPS (128)" "MAX_CLIPS (1024)" substituteInPlace vod/subtitle/dfxp_format.c \ --replace-fail '(!ctxt->wellFormed && !ctxt->recovery))' '!ctxt->wellFormed)' + # https://github.com/kaltura/nginx-vod-module/pull/1593 + substituteInPlace ngx_http_vod_module.c \ + --replace-fail 'ngx_http_vod_exit_process()' 'ngx_http_vod_exit_process(ngx_cycle_t *cycle)' ''; };