58 lines
1.3 KiB
Nix
58 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
rustPlatform,
|
|
pkg-config,
|
|
openssl,
|
|
mpv,
|
|
nix-update-script,
|
|
writableTmpDirAsHomeHook,
|
|
versionCheckHook,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "jellyfin-tui";
|
|
version = "1.2.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "dhonus";
|
|
repo = "jellyfin-tui";
|
|
tag = "v${version}";
|
|
hash = "sha256-gT6Zs32BhSfwH+JjwJcY9wK7WrqGuaWP+q/2rF8gp4M=";
|
|
};
|
|
|
|
useFetchCargoVendor = true;
|
|
cargoHash = "sha256-U298pYDYzaRdU5w3FWHMkgaCT15aUTZITroVcEJ1Q0w=";
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
buildInputs = [
|
|
openssl
|
|
mpv
|
|
];
|
|
|
|
nativeInstallCheckInputs = [
|
|
writableTmpDirAsHomeHook
|
|
versionCheckHook
|
|
];
|
|
versionCheckProgramArg = "--version";
|
|
versionCheckKeepEnvironment = [ "HOME" ];
|
|
preInstallCheck = ''
|
|
mkdir -p "$HOME/${
|
|
if stdenv.buildPlatform.isDarwin then "Library/Application Support" else ".local/share"
|
|
}"
|
|
'';
|
|
doInstallCheck = true;
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = {
|
|
description = "Jellyfin music streaming client for the terminal";
|
|
mainProgram = "jellyfin-tui";
|
|
homepage = "https://github.com/dhonus/jellyfin-tui";
|
|
changelog = "https://github.com/dhonus/jellyfin-tui/releases/tag/v${version}";
|
|
license = lib.licenses.gpl3Only;
|
|
maintainers = with lib.maintainers; [ GKHWB ];
|
|
};
|
|
}
|