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