summary refs log tree commit diff
path: root/pkgs/tools/misc/audible-cli/default.nix
blob: 98a34082184eaef44d9e1d92d66bb2caef121728 (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.1.3";

  src = fetchFromGitHub {
    owner = "mkb79";
    repo = pname;
    rev = "v${version}";
    sha256 = "0i71vwq2bhndndb0mlx21bc5jkv75cr60max5iaxk23agg3xpgwv";
  };

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

  postPatch = ''
    substituteInPlace setup.py \
      --replace "httpx==0.20.*" "httpx" \
      --replace "audible==0.7.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 ];
  };
}