nixpkgs/pkgs/applications/video/mpv/scripts/mpvacious.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1.1 KiB
Nix
Raw Normal View History

2021-09-28 19:33:25 +00:00
{ lib
, buildLua
2021-09-28 19:33:25 +00:00
, fetchFromGitHub
, gitUpdater
2021-09-28 19:33:25 +00:00
, curl
, wl-clipboard
, xclip
}:
2021-01-16 16:01:38 +00:00
buildLua rec {
2021-01-16 16:01:38 +00:00
pname = "mpvacious";
2024-04-24 04:28:50 +00:00
version = "0.31";
2021-01-16 16:01:38 +00:00
src = fetchFromGitHub {
owner = "Ajatt-Tools";
repo = "mpvacious";
rev = "v${version}";
2024-04-24 04:28:50 +00:00
sha256 = "sha256-+lixe8FG5jzjEYu4t9bWRy4W/oThV9IdlzeA/ogMlWM=";
2021-01-16 16:01:38 +00:00
};
passthru.updateScript = gitUpdater {
rev-prefix = "v";
};
2021-01-16 16:01:38 +00:00
postPatch = ''
2022-08-24 12:21:54 +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-01-16 16:01:38 +00:00
'';
installPhase = ''
runHook preInstall
make PREFIX=$out/share/mpv install
2021-01-16 16:01:38 +00:00
runHook postInstall
'';
2023-12-12 10:19:25 +00:00
passthru.scriptName = "mpvacious";
2021-01-16 16:01:38 +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 ];
};
}