1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 poetry-core,
6 pythonRelaxDepsHook,
7 beautifulsoup4,
8 comicon,
9 feedparser,
10 filetype,
11 lxml,
12 natsort,
13 nix-update-script,
14 pillow,
15 python-slugify,
16 requests,
17 typer,
18 pyside6,
19}:
20
21buildPythonPackage rec {
22 pname = "mandown";
23 version = "1.8.2";
24 pyproject = true;
25
26 src = fetchFromGitHub {
27 owner = "potatoeggy";
28 repo = "mandown";
29 rev = "refs/tags/v${version}";
30 hash = "sha256-DSbxWff5pY7tjB9aXY8/rQJzCQyDN2+OrmP10uEeXWM=";
31 };
32
33 nativeBuildInputs = [
34 poetry-core
35 pythonRelaxDepsHook
36 ];
37
38 pythonRelaxDeps = [
39 "lxml"
40 "pillow"
41 "typer"
42 ];
43
44 propagatedBuildInputs = [
45 beautifulsoup4
46 comicon
47 feedparser
48 filetype
49 lxml
50 natsort
51 pillow
52 python-slugify
53 requests
54 typer
55 ];
56
57 passthru.optional-dependencies = {
58 gui = [ pyside6 ];
59 updateScript = nix-update-script { };
60 };
61
62 pythonImportsCheck = [ "mandown" ];
63
64 meta = with lib; {
65 changelog = "https://github.com/potatoeggy/mandown/releases/tag/v${version}";
66 description = "Comic/manga/webtoon downloader and CBZ/EPUB/MOBI/PDF converter";
67 homepage = "https://github.com/potatoeggy/mandown";
68 license = licenses.agpl3Only;
69 maintainers = with maintainers; [ Scrumplex ];
70 };
71}