package.nix (1282B)
1 { 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 python3Packages, 6 installShellFiles, 7 writableTmpDirAsHomeHook, 8 }: 9 10 python3Packages.buildPythonApplication (finalAttrs: { 11 pname = "yt-cli"; 12 version = "0.25.1"; 13 pyproject = true; 14 15 src = fetchFromGitHub { 16 owner = "ryancheley"; 17 repo = "yt-cli"; 18 tag = "v${finalAttrs.version}"; 19 hash = "sha256-niOyM9VQ+xHddOiI0U60m5zDYlZV3eMtvnbLC+acWvg="; 20 }; 21 22 build-system = with python3Packages; [ hatchling ]; 23 24 dependencies = with python3Packages; [ 25 rich 26 textual 27 pydantic 28 click 29 httpx 30 python-dotenv 31 pydantic-settings 32 structlog 33 keyring 34 cryptography 35 ty 36 docker 37 ]; 38 39 nativeBuildInputs = [ 40 installShellFiles 41 writableTmpDirAsHomeHook 42 ]; 43 44 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' 45 installShellCompletion --cmd yt \ 46 --bash <($out/bin/yt completion bash) \ 47 --fish <($out/bin/yt completion fish) \ 48 --zsh <($out/bin/yt completion zsh) 49 ''; 50 51 meta = { 52 description = "Command line interface for JetBrains YouTrack issue tracking system"; 53 homepage = "https://github.com/ryancheley/yt-cli"; 54 license = lib.licenses.mit; 55 maintainers = [ lib.maintainers.sikmir ]; 56 mainProgram = "yt"; 57 }; 58 })
