mpvScripts.buildLua: Run {pre, post}install hooks

This is necessary, as users of buildLua may expect the phase hooks to work,
including indirect uses such as adding a hook through `mpvScripts.foo.override`.
This commit is contained in:
nicoo
2023-11-05 15:42:47 +00:00
parent 54d250735a
commit 7b792b0bcf
@@ -10,9 +10,13 @@ lib.makeOverridable (
preferLocalBuild = true;
outputHashMode = "recursive";
installPhase = "install -m644 -Dt $out/share/mpv/scripts ${scriptPath}";
passthru.scriptName = fileName scriptPath;
installPhase = ''
runHook preInstall
install -m644 -Dt $out/share/mpv/scripts ${scriptPath}
runHook postInstall
'';
passthru.scriptName = fileName scriptPath;
meta.platforms = lib.platforms.all;
} args)
)