1{ lib 2, buildPythonPackage 3, pythonOlder 4, fetchFromGitHub 5, hatchling 6, aiosqlite 7, anyio 8, y-py 9, pytest-asyncio 10, pytestCheckHook 11, pythonRelaxDepsHook 12, uvicorn 13, websockets 14}: 15 16buildPythonPackage rec { 17 pname = "ypy-websocket"; 18 version = "0.12.4"; 19 format = "pyproject"; 20 21 disabled = pythonOlder "3.7"; 22 23 src = fetchFromGitHub { 24 owner = "y-crdt"; 25 repo = "ypy-websocket"; 26 rev = "refs/tags/v${version}"; 27 hash = "sha256-48x+MUhev9dErC003XOP3oGKd5uOghlBFgcR8Nm/0xs="; 28 }; 29 30 pythonRelaxDeps = [ 31 "aiofiles" 32 ]; 33 34 nativeBuildInputs = [ 35 hatchling 36 pythonRelaxDepsHook 37 ]; 38 39 propagatedBuildInputs = [ 40 aiosqlite 41 anyio 42 y-py 43 ]; 44 45 pythonImportsCheck = [ 46 "ypy_websocket" 47 ]; 48 49 nativeCheckInputs = [ 50 pytest-asyncio 51 pytestCheckHook 52 uvicorn 53 websockets 54 ]; 55 56 disabledTestPaths = [ 57 # requires installing yjs Node.js module 58 "tests/test_ypy_yjs.py" 59 ]; 60 61 meta = { 62 changelog = "https://github.com/y-crdt/ypy-websocket/blob/${src.rev}/CHANGELOG.md"; 63 description = "WebSocket Connector for Ypy"; 64 homepage = "https://github.com/y-crdt/ypy-websocket"; 65 license = lib.licenses.mit; 66 maintainers = with lib.maintainers; [ dotlambda ]; 67 }; 68}