bilibili-tui: init at 1.0.6 (#478306)
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
{
|
||||
lib,
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
stdenv,
|
||||
pkg-config,
|
||||
makeWrapper,
|
||||
openssl,
|
||||
mpv-unwrapped,
|
||||
yt-dlp-light,
|
||||
|
||||
withMpv ? true,
|
||||
}:
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "bilibili-tui";
|
||||
version = "1.0.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "MareDevi";
|
||||
repo = "bilibili-tui";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-nWUFcKQgUNaiVU0zgSB8LTdvUruc8fovCAembQz5w3I=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-KvJpMQuvZM/s3b4/Pzmeucb95KeuuUx4bz3sJsKyLc8=";
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ pkg-config ];
|
||||
|
||||
buildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [ openssl ];
|
||||
|
||||
env.OPENSSL_NO_VENDOR = true;
|
||||
|
||||
# Wrap mpv as fallback; users should prefer their system's mpv in PATH
|
||||
postInstall = lib.optionalString withMpv ''
|
||||
wrapProgram $out/bin/bilibili-tui \
|
||||
--suffix PATH : ${
|
||||
lib.makeBinPath [
|
||||
mpv-unwrapped
|
||||
yt-dlp-light
|
||||
]
|
||||
}
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Terminal user interface (TUI) client for Bilibili";
|
||||
homepage = "https://maredevi.moe/projects/bilibili-tui/";
|
||||
downloadPage = "https://github.com/MareDevi/bilibili-tui/releases";
|
||||
changelog = "https://github.com/MareDevi/bilibili-tui/releases/tag/${finalAttrs.src.tag}";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ puiyq ];
|
||||
mainProgram = "bilibili-tui";
|
||||
};
|
||||
})
|
||||
Reference in New Issue
Block a user