summaryrefslogtreecommitdiff
path: root/pkgs/lightnovel-crawler.nix
blob: dcdd1bd6257da6d72e36661a5e996b11b8b2a6b5 (plain)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{
  lib,
  python3Packages,
  fetchFromGitHub,
}:
python3Packages.buildPythonApplication rec {
  pname = "lightnovel-crawler";
  version = "3.7.5";
  # NOTE: the project uses a plain setup.py, but setting this is still recommended
  # see: https://nixos.org/manual/nixpkgs/stable/#buildpythonpackage-parameters
  pyproject = true;

  src = fetchFromGitHub {
    owner = "dipu-bd";
    repo = "lightnovel-crawler";
    rev = "v${version}";
    sha256 = "sha256-aYnx+t8DkSty9Kdz+NxYEQWiMFpJ6/5xWNpKkvcnkR8=";
  };

  build-system = with python3Packages; [
    setuptools
  ];

  dependencies = with python3Packages; [
    ascii
    regex
    pyease-grpc
    python-dotenv
    beautifulsoup4
    requests
    python-slugify
    colorama
    tqdm
    pyexecjs
    ebooklib
    pillow
    cloudscraper
    lxml
    lxml-html-clean
    readability-lxml
    questionary
    prompt-toolkit
    html5lib
    base58
    python-box
    pycryptodome
    selenium
    packaging
  ];

  meta = {
    homepage = "https://github.com/dipu-bd/lightnovel-crawler";
    description = "Generate and download e-books from online sources";
    license = lib.licenses.gpl3;
  };
}