2c76a4cb41
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
22 lines
550 B
Nix
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)
|
|
)
|