mpvScripts.buildLua: add a runtime-dependencies option

This commit is contained in:
nicoo
2025-03-09 17:20:45 +00:00
parent 270903c3b1
commit e2596ac22d
@@ -24,6 +24,7 @@ lib.makeOverridable (
{ {
pname, pname,
extraScripts ? [ ], extraScripts ? [ ],
runtime-dependencies ? [ ],
... ...
}@args: }@args:
let let
@@ -75,9 +76,20 @@ lib.makeOverridable (
runHook postInstall runHook postInstall
''; '';
passthru = { passthru =
inherit scriptName; {
}; inherit scriptName;
}
// lib.optionalAttrs (runtime-dependencies != [ ]) {
extraWrapperArgs =
[
"--prefix"
"PATH"
":"
]
++ (map lib.makeBinPath runtime-dependencies)
++ args.passthru.extraWrapperArgs or [ ];
};
meta = meta =
{ {
platforms = lib.platforms.all; platforms = lib.platforms.all;