1{
2 lib,
3 aiofiles,
4 aiohttp,
5 buildPythonPackage,
6 certifi,
7 docutils,
8 fastapi,
9 fetchFromGitHub,
10 httpx,
11 ifaddr,
12 itsdangerous,
13 jinja2,
14 libsass,
15 markdown2,
16 matplotlib,
17 orjson,
18 pandas,
19 pkgs,
20 plotly,
21 poetry-core,
22 polars,
23 pyecharts,
24 pygments,
25 pytest-asyncio,
26 pytest-selenium,
27 pytestCheckHook,
28 python-multipart,
29 python-socketio,
30 pywebview,
31 redis,
32 requests,
33 setuptools,
34 typing-extensions,
35 urllib3,
36 uvicorn,
37 vbuild,
38 watchfiles,
39 webdriver-manager,
40 writableTmpDirAsHomeHook,
41}:
42
43buildPythonPackage rec {
44 pname = "nicegui";
45 version = "2.24.2";
46 pyproject = true;
47
48 src = fetchFromGitHub {
49 owner = "zauberzeug";
50 repo = "nicegui";
51 tag = "v${version}";
52 hash = "sha256-DfYNwtH3p1frF8ehKjl7P1iPQZ+icD4YKZHpD/9oj6Q=";
53 };
54
55 pythonRelaxDeps = [ "requests" ];
56
57 build-system = [
58 poetry-core
59 setuptools
60 ];
61
62 dependencies = [
63 aiofiles
64 aiohttp
65 certifi
66 docutils
67 fastapi
68 httpx
69 ifaddr
70 itsdangerous
71 jinja2
72 markdown2
73 orjson
74 pygments
75 python-multipart
76 python-socketio
77 requests
78 typing-extensions
79 urllib3
80 uvicorn
81 vbuild
82 watchfiles
83 ];
84
85 optional-dependencies = {
86 # Circular dependency
87 # highcharts = [ nicegui-highcharts ];
88 matplotlib = [ matplotlib ];
89 native = [ pywebview ];
90 plotly = [ plotly ];
91 sass = [ libsass ];
92 redis = [ redis ];
93 };
94
95 nativeCheckInputs = [
96 pandas
97 pkgs.chromedriver
98 polars
99 pyecharts
100 pytest-asyncio
101 pytest-selenium
102 pytestCheckHook
103 webdriver-manager
104 writableTmpDirAsHomeHook
105 ]
106 ++ lib.flatten (builtins.attrValues optional-dependencies);
107
108 pythonImportsCheck = [ "nicegui" ];
109
110 # chromedriver release doesn't seems to be supported, try with next release
111 doCheck = false;
112
113 meta = {
114 description = "Module to create web-based user interfaces";
115 homepage = "https://github.com/zauberzeug/nicegui/";
116 changelog = "https://github.com/zauberzeug/nicegui/releases/tag/${src.tag}";
117 license = lib.licenses.mit;
118 maintainers = with lib.maintainers; [ fab ];
119 };
120}