2021-04-22 02:08:21 +00:00
|
|
|
{ lib, stdenvNoCC, fetchFromGitHub, curl, xclip }:
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2021-04-22 02:08:21 +00:00
|
|
|
stdenvNoCC.mkDerivation rec {
|
2021-02-05 17:12:51 +00:00
|
|
|
pname = "mpvacious";
|
2021-04-15 00:37:46 +00:00
|
|
|
version = "0.14";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Ajatt-Tools";
|
|
|
|
repo = "mpvacious";
|
|
|
|
rev = "v${version}";
|
2021-04-15 00:37:46 +00:00
|
|
|
sha256 = "0r031hh3hpim9dli15m9q4cwka4ljvwg0hdgyp36r1n097q44r5f";
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|