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