1{
2 lib,
3 aiohttp,
4 async-timeout,
5 buildPythonPackage,
6 fetchFromGitHub,
7 jsonrpc-base,
8 pytest-asyncio,
9 pytestCheckHook,
10 pythonOlder,
11 setuptools,
12}:
13
14buildPythonPackage rec {
15 pname = "jsonrpc-websocket";
16 version = "3.1.5";
17 pyproject = true;
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "emlove";
23 repo = "jsonrpc-websocket";
24 tag = version;
25 hash = "sha256-CdYa4gcbG3EM1glxLU1hyqbNse87KJKjwSRQSFfDMM0=";
26 };
27
28 nativeBuildInputs = [ setuptools ];
29
30 propagatedBuildInputs = [
31 aiohttp
32 async-timeout
33 jsonrpc-base
34 ];
35
36 nativeCheckInputs = [
37 pytest-asyncio
38 pytestCheckHook
39 ];
40
41 pytestFlagsArray = [
42 "--asyncio-mode=auto"
43 "tests.py"
44 ];
45
46 pythonImportsCheck = [ "jsonrpc_websocket" ];
47
48 meta = with lib; {
49 description = "JSON-RPC websocket client library for asyncio";
50 homepage = "https://github.com/emlove/jsonrpc-websocket";
51 license = licenses.bsd3;
52 maintainers = with maintainers; [ peterhoeg ];
53 };
54}