summary refs log tree commit diff
path: root/pkgs/tools/misc/audible-cli/default.nix
blob: f83a87a75b2503f42c6b3b6cb8f49283bc496912 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{ lib, python3Packages, fetchFromGitHub }:

python3Packages.buildPythonApplication rec {
  pname = "audible-cli";
  version = "0.2.4";

  src = fetchFromGitHub {
    owner = "mkb79";
    repo = pname;
    rev = "refs/tags/v${version}";
    sha256 = "sha256-umIPHKPfWKlzEVyRKbBqmul/8n13EnpfYXmSQbQtLq8=";
  };

  propagatedBuildInputs = with python3Packages; [ aiofiles audible click httpx pillow tabulate toml tqdm packaging setuptools questionary ];

  postPatch = ''
    substituteInPlace setup.py \
      --replace "httpx>=0.20.0,<0.24.0" "httpx" \
      --replace "audible>=0.8.2" "audible"
  '';

  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.agpl3;
    homepage = "https://github.com/mkb79/audible-cli";
    maintainers = with maintainers; [ jvanbruegge ];
  };
}