From 05ff3adc4e933e7baf714caa00ae04dfda68b8bd Mon Sep 17 00:00:00 2001 From: skykanin <3789764+skykanin@users.noreply.github.com> Date: Sun, 13 Aug 2023 21:33:57 +0200 Subject: [PATCH] ani-cli: 4.5 -> 4.6 --- pkgs/applications/video/ani-cli/default.nix | 28 +++++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/video/ani-cli/default.nix b/pkgs/applications/video/ani-cli/default.nix index 2766afd7711a..21c04812f9f3 100644 --- a/pkgs/applications/video/ani-cli/default.nix +++ b/pkgs/applications/video/ani-cli/default.nix @@ -4,24 +4,42 @@ , lib , gnugrep , gnused -, wget +, curl +, catt +, syncplay +, ffmpeg , fzf -, mpv , aria2 +, withMpv ? true, mpv +, withVlc ? false, vlc +, withIina ? false, iina +, chromecastSupport ? false +, syncSupport ? false }: +assert withMpv || withVlc || withIina; + stdenvNoCC.mkDerivation rec { pname = "ani-cli"; - version = "4.5"; + version = "4.6"; src = fetchFromGitHub { owner = "pystardust"; repo = "ani-cli"; rev = "v${version}"; - hash = "sha256-HDpspU9OZxDET7/1rnKdGgaVEBt0gpzGtd3DuNIj7FY="; + hash = "sha256-ahyCD4QsYyb3xtNK03HITeF0+hJFIHZ+PAjisuS/Kdo="; }; nativeBuildInputs = [ makeWrapper ]; + 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; installPhase = '' runHook preInstall @@ -29,7 +47,7 @@ stdenvNoCC.mkDerivation rec { install -Dm755 ani-cli $out/bin/ani-cli wrapProgram $out/bin/ani-cli \ - --prefix PATH : ${lib.makeBinPath [ gnugrep gnused wget fzf mpv aria2 ]} + --prefix PATH : ${lib.makeBinPath runtimeDependencies} runHook postInstall '';