mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-11 10:22:54 +08:00
nginxModules.vod: cleanup
- 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`.
This commit is contained in:
@@ -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)'
|
||||
'';
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user