depot/third_party/nixpkgs/pkgs/applications/video/mpv/scripts/buildLua.nix
Default email 2c76a4cb41 Project import generated by Copybara.
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
2023-11-16 04:20:00 +00:00

22 lines
550 B
Nix

{ lib
, stdenvNoCC }:
let fileName = pathStr: lib.last (lib.splitString "/" pathStr);
in
lib.makeOverridable (
{ pname, scriptPath ? "${pname}.lua", ... }@args:
stdenvNoCC.mkDerivation (lib.attrsets.recursiveUpdate {
dontBuild = true;
preferLocalBuild = true;
outputHashMode = "recursive";
installPhase = ''
runHook preInstall
install -m644 -Dt $out/share/mpv/scripts ${scriptPath}
runHook postInstall
'';
passthru.scriptName = fileName scriptPath;
meta.platforms = lib.platforms.all;
} args)
)