55 lines
1.1 KiB
Nix
55 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
pkg-config,
|
|
openssl,
|
|
xorg,
|
|
stdenv,
|
|
python3,
|
|
makeBinaryWrapper,
|
|
libsixel,
|
|
mpv,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "youtube-tui";
|
|
version = "0.9.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Siriusmart";
|
|
repo = "youtube-tui";
|
|
tag = "v${version}";
|
|
hash = "sha256-oqhrSArzyGirOLyQtYsfW78pRyMFLSyDwjtz43jfDN8=";
|
|
};
|
|
|
|
cargoHash = "sha256-RxBWy1Nly6lehZBufTxuUGsUkiDaG4xNT/Efs53hy1c=";
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
python3
|
|
makeBinaryWrapper
|
|
];
|
|
|
|
buildInputs = [
|
|
openssl
|
|
xorg.libxcb
|
|
libsixel
|
|
mpv
|
|
];
|
|
|
|
# sixel-sys is dynamically linked to libsixel
|
|
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
|
wrapProgram $out/bin/youtube-tui \
|
|
--prefix DYLD_LIBRARY_PATH : "${lib.makeLibraryPath [ libsixel ]}"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Aesthetically pleasing YouTube TUI written in Rust";
|
|
homepage = "https://siriusmart.github.io/youtube-tui";
|
|
license = licenses.gpl3Only;
|
|
maintainers = with maintainers; [ Ruixi-rebirth ];
|
|
mainProgram = "youtube-tui";
|
|
};
|
|
}
|