1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6 hatchling,
7 aiosqlite,
8 anyio,
9 y-py,
10 pytest-asyncio,
11 pytestCheckHook,
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 = [ "aiofiles" ];
31
32 nativeBuildInputs = [
33 hatchling
34 ];
35
36 propagatedBuildInputs = [
37 aiosqlite
38 anyio
39 y-py
40 ];
41
42 pythonImportsCheck = [ "ypy_websocket" ];
43
44 nativeCheckInputs = [
45 pytest-asyncio
46 pytestCheckHook
47 uvicorn
48 websockets
49 ];
50
51 disabledTestPaths = [
52 # requires installing yjs Node.js module
53 "tests/test_ypy_yjs.py"
54 ];
55
56 meta = {
57 changelog = "https://github.com/y-crdt/ypy-websocket/blob/${src.rev}/CHANGELOG.md";
58 description = "WebSocket Connector for Ypy";
59 homepage = "https://github.com/y-crdt/ypy-websocket";
60 license = lib.licenses.mit;
61 maintainers = with lib.maintainers; [ dotlambda ];
62 };
63}