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