1{ lib
2, buildPythonPackage
3, ed25519
4, fetchFromGitHub
5, nats-server
6, pytestCheckHook
7, pythonOlder
8}:
9
10buildPythonPackage rec {
11 pname = "asyncio-nats-client";
12 version = "0.11.4";
13 disabled = pythonOlder "3.6";
14
15 src = fetchFromGitHub {
16 owner = "nats-io";
17 repo = "nats.py";
18 rev = "v${version}";
19 sha256 = "1aj57xi2rj1xswq8air13xdsll1ybpi0nmz5f6jq01azm0zy9xyd";
20 };
21
22 propagatedBuildInputs = [
23 ed25519
24 ];
25
26 checkInputs = [
27 nats-server
28 pytestCheckHook
29 ];
30
31 postPatch = ''
32 substituteInPlace setup.cfg \
33 --replace "--cov=nats --cov-report html" ""
34 '';
35
36 disabledTests = [
37 # RuntimeError: Event loop is closed
38 "test_subscribe_no_echo"
39 "test_reconnect_to_new_server_with_auth"
40 ];
41
42 pythonImportsCheck = [ "nats.aio" ];
43
44 meta = with lib; {
45 description = "Python client for NATS.io";
46 homepage = "https://github.com/nats-io/nats.py";
47 license = with licenses; [ asl20 ];
48 maintainers = with maintainers; [ fab ];
49 };
50}