Commit 7b792b0b authored by nicoo's avatar nicoo
Browse files

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`.
parent 54d25073
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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)
)