2022-01-07 04:07:37 +00:00
|
|
|
{ lib
|
|
|
|
, stdenvNoCC
|
|
|
|
, fetchFromGitHub
|
|
|
|
, curl
|
|
|
|
, wl-clipboard
|
|
|
|
, 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";
|
2022-01-07 04:07:37 +00:00
|
|
|
version = "0.15";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Ajatt-Tools";
|
|
|
|
repo = "mpvacious";
|
|
|
|
rev = "v${version}";
|
2022-01-07 04:07:37 +00:00
|
|
|
sha256 = "1lxlgbjk4x3skg5s7kkr9llcdlmpmabfrcslwhhz5f4j3bq7498w";
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace subs2srs.lua \
|
|
|
|
--replace "'curl'" "'${curl}/bin/curl'" \
|
2022-01-07 04:07:37 +00:00
|
|
|
--replace "'wl-copy'" "'${wl-clipboard}/bin/wl-copy'" \
|
2021-02-05 17:12:51 +00:00
|
|
|
--replace "xclip" "${xclip}/bin/xclip"
|
|
|
|
'';
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
2022-01-07 04:07:37 +00:00
|
|
|
mkdir -p $out/share/mpv/scripts/mpvacious
|
|
|
|
cp *.lua $out/share/mpv/scripts/mpvacious
|
2021-02-05 17:12:51 +00:00
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
passthru.scriptName = "mpvacious";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|