b450903751
GitOrigin-RevId: 74a1793c659d09d7cf738005308b1f86c90cb59b
48 lines
1.1 KiB
Nix
48 lines
1.1 KiB
Nix
{ lib
|
|
, stdenvNoCC
|
|
, fetchFromGitHub
|
|
, curl
|
|
, wl-clipboard
|
|
, xclip
|
|
}:
|
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
pname = "mpvacious";
|
|
version = "0.18";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Ajatt-Tools";
|
|
repo = "mpvacious";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-FiYEpZVaeJQVSXa9obFYSKNVASJolOBm5D3faOlCzNY=";
|
|
};
|
|
|
|
postPatch = ''
|
|
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"
|
|
'';
|
|
|
|
dontBuild = true;
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
rm -r .github
|
|
mkdir -p $out/share/mpv/scripts
|
|
cp -r . $out/share/mpv/scripts/mpvacious
|
|
runHook postInstall
|
|
'';
|
|
|
|
passthru.scriptName = "mpvacious";
|
|
|
|
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 ];
|
|
};
|
|
}
|