1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonOlder, 6 hatchling, 7 anyio, 8 channels, 9 httpx-ws, 10 hypercorn, 11 pycrdt, 12 pytest-asyncio, 13 pytestCheckHook, 14 sqlite-anyio, 15 trio, 16 uvicorn, 17 websockets, 18}: 19 20buildPythonPackage rec { 21 pname = "pycrdt-websocket"; 22 version = "0.13.4"; 23 pyproject = true; 24 25 disabled = pythonOlder "3.8"; 26 27 src = fetchFromGitHub { 28 owner = "jupyter-server"; 29 repo = "pycrdt-websocket"; 30 rev = "refs/tags/v${version}"; 31 hash = "sha256-nkm1ZQ6bYBRDDoREovhEthDZoHApYxzAnwVgDgpWW/s="; 32 }; 33 34 build-system = [ hatchling ]; 35 36 dependencies = [ 37 anyio 38 pycrdt 39 sqlite-anyio 40 ]; 41 42 optional-dependencies = { 43 django = [ channels ]; 44 }; 45 46 pythonImportsCheck = [ "pycrdt_websocket" ]; 47 48 nativeCheckInputs = [ 49 httpx-ws 50 hypercorn 51 pytest-asyncio 52 pytestCheckHook 53 trio 54 uvicorn 55 websockets 56 ]; 57 58 disabledTestPaths = [ 59 # requires nodejs and installed js modules 60 "tests/test_pycrdt_yjs.py" 61 ]; 62 63 __darwinAllowLocalNetworking = true; 64 65 meta = with lib; { 66 description = "WebSocket Connector for pycrdt"; 67 homepage = "https://github.com/jupyter-server/pycrdt-websocket"; 68 changelog = "https://github.com/jupyter-server/pycrdt-websocket/blob/${src.rev}/CHANGELOG.md"; 69 license = licenses.mit; 70 maintainers = teams.jupyter.members; 71 }; 72}