-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update ani-cli v4.6 -> v4.8 (For NixOS 23.05)
- Loading branch information
Showing
1 changed file
with
38 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,69 @@ | ||
{ fetchFromGitHub | ||
, makeWrapper | ||
, stdenvNoCC | ||
, lib | ||
, gnugrep | ||
, gnused | ||
, curl | ||
, catt | ||
, syncplay | ||
, ffmpeg | ||
, fzf | ||
, aria2 | ||
, withMpv ? true, mpv | ||
, withVlc ? false, vlc | ||
, withIina ? false, iina | ||
, chromecastSupport ? false | ||
, syncSupport ? false | ||
{ | ||
fetchFromGitHub, | ||
makeWrapper, | ||
stdenvNoCC, | ||
lib, | ||
gnugrep, | ||
gnused, | ||
curl, | ||
catt, | ||
syncplay, | ||
ffmpeg, | ||
fzf, | ||
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.6"; | ||
version = "4.8"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "pystardust"; | ||
repo = "ani-cli"; | ||
rev = "v${version}"; | ||
hash = "sha256-ahyCD4QsYyb3xtNK03HITeF0+hJFIHZ+PAjisuS/Kdo="; | ||
hash = "sha256-vntCiWaONndjU622c1BoCoASQxQf/i7yO0x+70OxzPU="; | ||
}; | ||
|
||
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; | ||
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 | ||
install -Dm755 ani-cli $out/bin/ani-cli | ||
wrapProgram $out/bin/ani-cli \ | ||
--prefix PATH : ${lib.makeBinPath runtimeDependencies} | ||
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; | ||
mainProgram = "ani-cli"; | ||
}; | ||
} |