nixpkgs/pkgs/tools/misc/audible-cli/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

64 lines
1.5 KiB
Nix
Raw Normal View History

{ lib, python3Packages, fetchFromGitHub, installShellFiles }:
2022-05-14 13:54:36 +00:00
python3Packages.buildPythonApplication rec {
pname = "audible-cli";
2024-01-22 05:38:35 +00:00
version = "0.2.6";
pyproject = true;
2022-05-14 13:54:36 +00:00
src = fetchFromGitHub {
owner = "mkb79";
repo = "audible-cli";
2022-07-30 03:13:16 +00:00
rev = "refs/tags/v${version}";
2024-01-22 05:38:35 +00:00
hash = "sha256-J81RcehFokOpsQBJLvmeihSrlMyX0geHPl3PPxvGjmY=";
2022-05-14 13:54:36 +00:00
};
nativeBuildInputs = with python3Packages; [
pythonRelaxDepsHook
setuptools
] ++ [
installShellFiles
];
2022-05-14 13:54:36 +00:00
propagatedBuildInputs = with python3Packages; [
aiofiles
audible
click
httpx
packaging
pillow
questionary
tabulate
toml
tqdm
];
pythonRelaxDeps = [
"httpx"
"audible"
];
postInstall = ''
export PATH=$out/bin:$PATH
installShellCompletion --cmd audible \
--bash <(source utils/code_completion/audible-complete-bash.sh) \
--fish <(source utils/code_completion/audible-complete-zsh-fish.sh) \
--zsh <(source utils/code_completion/audible-complete-zsh-fish.sh)
2022-05-14 13:54:36 +00:00
'';
# upstream has no tests
doCheck = false;
pythonImportsCheck = [
"audible_cli"
];
2022-05-14 13:54:36 +00:00
meta = with lib; {
description = "A command line interface for audible package. With the cli you can download your Audible books, cover, chapter files";
license = licenses.agpl3Only;
2022-05-14 13:54:36 +00:00
homepage = "https://github.com/mkb79/audible-cli";
changelog = "https://github.com/mkb79/audible-cli/blob/${src.rev}/CHANGELOG.md";
2022-05-14 13:54:36 +00:00
maintainers = with maintainers; [ jvanbruegge ];
mainProgram = "audible";
2022-05-14 13:54:36 +00:00
};
}