1{ lib
2, stdenvNoCC }:
3
4let fileName = pathStr: lib.last (lib.splitString "/" pathStr);
5in
6lib.makeOverridable (
7 { pname, scriptPath ? "${pname}.lua", ... }@args:
8 stdenvNoCC.mkDerivation (lib.attrsets.recursiveUpdate {
9 dontBuild = true;
10 preferLocalBuild = true;
11
12 outputHashMode = "recursive";
13 installPhase = ''
14 runHook preInstall
15 install -m644 -Dt $out/share/mpv/scripts ${scriptPath}
16 runHook postInstall
17 '';
18
19 passthru.scriptName = fileName scriptPath;
20 meta.platforms = lib.platforms.all;
21 } args)
22)