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";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "0.24";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Ajatt-Tools";
|
|
|
|
repo = "mpvacious";
|
|
|
|
rev = "v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
sha256 = "sha256-o0YcoSI+4934HlyIoI5V1h/FalCe+6tXS8Lg6kXWjSg=";
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2022-09-09 14:08:57 +00:00
|
|
|
substituteInPlace utils/forvo.lua \
|
|
|
|
--replace "'curl" "'${curl}/bin/curl"
|
|
|
|
substituteInPlace platform/nix.lua \
|
|
|
|
--replace "'curl" "'${curl}/bin/curl" \
|
|
|
|
--replace "'wl-copy" "'${wl-clipboard}/bin/wl-copy" \
|
|
|
|
--replace "'xclip" "'${xclip}/bin/xclip"
|
2021-02-05 17:12:51 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
2022-09-09 14:08:57 +00:00
|
|
|
rm -r .github
|
|
|
|
mkdir -p $out/share/mpv/scripts
|
|
|
|
cp -r . $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 ];
|
|
|
|
};
|
|
|
|
}
|