nixpkgs/pkgs/applications/video/ani-cli/default.nix

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

64 lines
1.3 KiB
Nix
Raw Normal View History

2022-03-10 21:05:08 +01:00
{ fetchFromGitHub
, makeWrapper
, stdenvNoCC
, lib
, gnugrep
, gnused
2023-08-13 21:33:57 +02:00
, curl
, catt
, syncplay
, ffmpeg
2023-01-30 22:20:28 +01:00
, fzf
2022-03-10 21:05:08 +01:00
, aria2
2023-08-13 21:33:57 +02:00
, withMpv ? true, mpv
, withVlc ? false, vlc
, withIina ? false, iina
, chromecastSupport ? false
, syncSupport ? false
2022-03-10 21:05:08 +01:00
}:
2023-08-13 21:33:57 +02:00
assert withMpv || withVlc || withIina;
2022-03-10 21:05:08 +01:00
stdenvNoCC.mkDerivation rec {
pname = "ani-cli";
version = "4.8";
2022-03-10 21:05:08 +01:00
src = fetchFromGitHub {
owner = "pystardust";
repo = "ani-cli";
rev = "v${version}";
hash = "sha256-vntCiWaONndjU622c1BoCoASQxQf/i7yO0x+70OxzPU=";
2022-03-10 21:05:08 +01:00
};
nativeBuildInputs = [ makeWrapper ];
2023-08-13 21:33:57 +02:00
runtimeDependencies =
let player = []
++ lib.optional withMpv mpv
++ lib.optional withVlc vlc
++ lib.optional withIina iina;
in [ gnugrep gnused curl fzf ffmpeg aria2 ]
++ player
++ lib.optional chromecastSupport catt
++ lib.optional syncSupport syncplay;
2022-03-10 21:05:08 +01:00
installPhase = ''
runHook preInstall
install -Dm755 ani-cli $out/bin/ani-cli
wrapProgram $out/bin/ani-cli \
2023-08-13 21:33:57 +02:00
--prefix PATH : ${lib.makeBinPath runtimeDependencies}
2022-03-10 21:05:08 +01:00
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/pystardust/ani-cli";
description = "A cli tool to browse and play anime";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ skykanin ];
platforms = platforms.unix;
2023-11-27 02:17:53 +01:00
mainProgram = "ani-cli";
2022-03-10 21:05:08 +01:00
};
}