{ 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 ]; # NOTE: I only want _one_ binary, called lncrawl # these are duplicates, deleting them # there's probably a smarter way to do this... postInstall = '' rm $out/bin/lightnovel-crawler $out/bin/lightnovel_crawler ''; meta = { homepage = "https://github.com/dipu-bd/lightnovel-crawler"; description = "Generate and download e-books from online sources"; license = lib.licenses.gpl3; }; }