diff options
author | Ken Micklas <git@kmicklas.com> | 2021-01-16 11:01:38 -0500 |
---|---|---|
committer | Ken Micklas <git@kmicklas.com> | 2021-01-16 11:43:25 -0500 |
commit | 6960160acb50275fa8d343243bd9ee4cd78c90e8 (patch) | |
tree | 6dc9276c2f7bcca72b364308f2b00f70d6b2d56a /pkgs/applications/video/mpv | |
parent | 5a23451fd37a63a16b7270f1043973b4fb2159c4 (diff) |
mpvScripts.mpvacious: init at 0.12
Diffstat (limited to 'pkgs/applications/video/mpv')
-rw-r--r-- | pkgs/applications/video/mpv/scripts/mpvacious.nix | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/applications/video/mpv/scripts/mpvacious.nix b/pkgs/applications/video/mpv/scripts/mpvacious.nix new file mode 100644 index 0000000000000..5bfcd2ac32c0d --- /dev/null +++ b/pkgs/applications/video/mpv/scripts/mpvacious.nix @@ -0,0 +1,38 @@ +{ lib, stdenv, fetchFromGitHub, curl, xclip }: + +stdenv.mkDerivation rec { + pname = "mpvacious"; + version = "0.12"; + + src = fetchFromGitHub { + owner = "Ajatt-Tools"; + repo = "mpvacious"; + rev = "v${version}"; + sha256 = "1xz4qh2ibfv03m3pfdasim9byvlm78wigx1linmih19vgg99vky2"; + }; + + postPatch = '' + substituteInPlace subs2srs.lua \ + --replace "'curl'" "'${curl}/bin/curl'" \ + --replace "xclip" "${xclip}/bin/xclip" + ''; + + dontBuild = true; + + installPhase = '' + runHook preInstall + mkdir -p $out/share/mpv/scripts + cp subs2srs.lua $out/share/mpv/scripts + runHook postInstall + ''; + + passthru.scriptName = "subs2srs.lua"; + + meta = with lib; { + description = "Adds mpv keybindings to create Anki cards from movies and TV shows"; + homepage = "https://github.com/Ajatt-Tools/mpvacious"; + license = licenses.gpl3Plus; + platforms = platforms.all; + maintainers = with maintainers; [ kmicklas ]; + }; +} |