depot/third_party/nixpkgs/pkgs/by-name/au/audible-cli/package.nix
Luke Granger-Brown f92e137cfb
Some checks failed
/ combine-systems (push) Blocked by required conditions
/ build (x86_64-linux) (push) Failing after 11m44s
/ build (aarch64-linux) (push) Failing after 11m50s
/ build (push) Failing after 16m42s
Merge commit '1e2ed035f4bebc9adad02b365508ad96f7df87c1' into HEAD
2025-03-02 02:23:32 +00:00

79 lines
1.6 KiB
Nix

{
lib,
python3Packages,
fetchFromGitHub,
addBinToPathHook,
installShellFiles,
nix-update-script,
}:
python3Packages.buildPythonApplication rec {
pname = "audible-cli";
version = "0.3.1";
pyproject = true;
src = fetchFromGitHub {
owner = "mkb79";
repo = "audible-cli";
tag = "v${version}";
hash = "sha256-AYL7lcYYY7gK12Id94aHRWRlCiznnF4r+lpI5VFpAWY=";
};
nativeBuildInputs =
with python3Packages;
[
setuptools
]
++ [
addBinToPathHook
installShellFiles
];
propagatedBuildInputs = with python3Packages; [
aiofiles
audible
click
httpx
packaging
pillow
questionary
setuptools
tabulate
toml
tqdm
];
pythonRelaxDeps = [
"httpx"
];
postInstall = ''
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)
'';
# upstream has no tests
doCheck = false;
pythonImportsCheck = [
"audible_cli"
];
passthru.updateScript = nix-update-script {
extraArgs = [
"--version-regex"
"[0-9.]+"
];
};
meta = with lib; {
description = "Command line interface for audible package. With the cli you can download your Audible books, cover, chapter files";
license = licenses.agpl3Only;
homepage = "https://github.com/mkb79/audible-cli";
changelog = "https://github.com/mkb79/audible-cli/blob/${src.rev}/CHANGELOG.md";
maintainers = with maintainers; [ jvanbruegge ];
mainProgram = "audible";
};
}