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