2025-01-19 09:38:58 -05:00
|
|
|
{
|
|
|
|
lib,
|
2025-07-03 16:35:58 +08:00
|
|
|
stdenv,
|
2025-01-19 09:38:58 -05:00
|
|
|
fetchFromGitHub,
|
|
|
|
rustPlatform,
|
|
|
|
pkg-config,
|
|
|
|
openssl,
|
|
|
|
mpv,
|
|
|
|
nix-update-script,
|
2025-06-23 18:35:43 -04:00
|
|
|
writableTmpDirAsHomeHook,
|
2025-01-19 09:38:58 -05:00
|
|
|
versionCheckHook,
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "jellyfin-tui";
|
2025-07-12 20:07:43 -04:00
|
|
|
version = "1.2.3";
|
2025-01-19 09:38:58 -05:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dhonus";
|
|
|
|
repo = "jellyfin-tui";
|
|
|
|
tag = "v${version}";
|
2025-07-12 20:07:43 -04:00
|
|
|
hash = "sha256-gT6Zs32BhSfwH+JjwJcY9wK7WrqGuaWP+q/2rF8gp4M=";
|
2025-01-19 09:38:58 -05:00
|
|
|
};
|
|
|
|
|
2025-01-23 08:45:31 +01:00
|
|
|
useFetchCargoVendor = true;
|
2025-07-12 20:07:43 -04:00
|
|
|
cargoHash = "sha256-U298pYDYzaRdU5w3FWHMkgaCT15aUTZITroVcEJ1Q0w=";
|
2025-01-19 09:38:58 -05:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
mpv
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeInstallCheckInputs = [
|
2025-06-23 18:35:43 -04:00
|
|
|
writableTmpDirAsHomeHook
|
2025-01-19 09:38:58 -05:00
|
|
|
versionCheckHook
|
|
|
|
];
|
|
|
|
versionCheckProgramArg = "--version";
|
2025-06-23 18:35:43 -04:00
|
|
|
versionCheckKeepEnvironment = [ "HOME" ];
|
|
|
|
preInstallCheck = ''
|
2025-07-03 16:35:58 +08:00
|
|
|
mkdir -p "$HOME/${
|
|
|
|
if stdenv.buildPlatform.isDarwin then "Library/Application Support" else ".local/share"
|
|
|
|
}"
|
2025-06-23 18:35:43 -04:00
|
|
|
'';
|
2025-01-19 09:38:58 -05:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|