2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildLua,
|
|
|
|
fetchFromGitHub,
|
|
|
|
gitUpdater,
|
|
|
|
curl,
|
|
|
|
wl-clipboard,
|
|
|
|
xclip,
|
2022-01-07 04:07:37 +00:00
|
|
|
}:
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
buildLua rec {
|
2021-02-05 17:12:51 +00:00
|
|
|
pname = "mpvacious";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.33";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Ajatt-Tools";
|
|
|
|
repo = "mpvacious";
|
|
|
|
rev = "v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
sha256 = "sha256-VHMXW2AzgX88EDnNshxo9Gh8mpXzRoTAq+58HKasUdo=";
|
2024-01-13 08:15:51 +00:00
|
|
|
};
|
2024-05-15 15:35:15 +00:00
|
|
|
passthru.updateScript = gitUpdater { rev-prefix = "v"; };
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
2022-09-09 14:08:57 +00:00
|
|
|
substituteInPlace utils/forvo.lua \
|
2024-05-15 15:35:15 +00:00
|
|
|
--replace-fail "'curl" "'${lib.getExe curl}"
|
2022-09-09 14:08:57 +00:00
|
|
|
substituteInPlace platform/nix.lua \
|
2024-05-15 15:35:15 +00:00
|
|
|
--replace-fail "'curl" "'${lib.getExe curl}" \
|
|
|
|
--replace-fail "'wl-copy" "'${lib.getExe' wl-clipboard "wl-copy"}" \
|
|
|
|
--replace-fail "'xclip" "'${lib.getExe xclip}"
|
2021-02-05 17:12:51 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
2024-01-02 11:29:13 +00:00
|
|
|
make PREFIX=$out/share/mpv install
|
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;
|
|
|
|
maintainers = with maintainers; [ kmicklas ];
|
|
|
|
};
|
|
|
|
}
|