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,
extraScripts ? [ ],
runtime-dependencies ? [ ],
...
}@args:
let
@@ -75,9 +76,20 @@ lib.makeOverridable (
runHook postInstall
'';
passthru = {
inherit scriptName;
};
passthru =
{
inherit scriptName;
}
// lib.optionalAttrs (runtime-dependencies != [ ]) {
extraWrapperArgs =
[
"--prefix"
"PATH"
":"
]
++ (map lib.makeBinPath runtime-dependencies)
++ args.passthru.extraWrapperArgs or [ ];
};
meta =
{
platforms = lib.platforms.all;