From 7b792b0bcffb77795001dc0840d090e21a609a6b Mon Sep 17 00:00:00 2001 From: nicoo Date: Wed, 18 Oct 2023 08:16:12 +0000 Subject: [PATCH] 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`. --- pkgs/applications/video/mpv/scripts/buildLua.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/video/mpv/scripts/buildLua.nix b/pkgs/applications/video/mpv/scripts/buildLua.nix index 79703d4cf1c4..b86642305fc6 100644 --- a/pkgs/applications/video/mpv/scripts/buildLua.nix +++ b/pkgs/applications/video/mpv/scripts/buildLua.nix @@ -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) )