58 lines
1.2 KiB
Nix
58 lines
1.2 KiB
Nix
{ pkgs, lib, stdenvNoCC, fetchFromGitHub, ffmpeg, mpv }:
|
|
stdenvNoCC.mkDerivation rec {
|
|
pname = "ani-cli";
|
|
version = "3.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "pystardust";
|
|
repo = "ani-cli";
|
|
rev = "v${version}";
|
|
sha256 = "Xb7MNL7YKbvyRR5ZppUfCYeYpjNAiJWNOjIFk5fUvpY=";
|
|
};
|
|
|
|
outputs = ["out" "man" "doc"];
|
|
|
|
buildInputs = [
|
|
mpv
|
|
ffmpeg
|
|
];
|
|
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
|
|
cp $src/ani-cli .
|
|
sed -i -e "s|ffmpeg|${ffmpeg}/bin/ffmpeg|" \
|
|
-e "s|mpv|${mpv}/bin/mpv|" \
|
|
ani-cli
|
|
|
|
runHook postBuild
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -Dm755 -t $out/bin ani-cli
|
|
install -Dm644 ani-cli.1.gz $man/share/man/man1/ani-cli.1.gz
|
|
install -Dm644 -t $doc/share/doc/ani-cli/ \
|
|
CONTRIBUTING.md \
|
|
disclaimer.md \
|
|
LICENSE \
|
|
README.md
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "A cli tool to browse and play anime";
|
|
longDescription = ''
|
|
A cli to browse and watch anime (alone AND with friends).
|
|
This tool scrapes the site animixplay.
|
|
'';
|
|
homepage = "https://github.com/pystardust/ani-cli";
|
|
license = licenses.gpl3;
|
|
maintainers = [ maintainers.h7x4 ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|
|
|