Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / nats-py / default.nix
blob7102d87286bb7675bffa39aa3e099f13d248f9e4
2   lib,
3   stdenv,
4   aiohttp,
5   buildPythonPackage,
6   ed25519,
7   fetchFromGitHub,
8   nats-server,
9   nkeys,
10   pytestCheckHook,
11   pythonOlder,
12   setuptools,
13   uvloop,
16 buildPythonPackage rec {
17   pname = "nats-py";
18   version = "2.7.2";
19   pyproject = true;
21   disabled = pythonOlder "3.7";
23   src = fetchFromGitHub {
24     owner = "nats-io";
25     repo = "nats.py";
26     rev = "refs/tags/v${version}";
27     hash = "sha256-5lvdt1JbOmdts0CYU00bSmv0LsMQsOe//yUgyevBULE=";
28   };
30   build-system = [ setuptools ];
32   dependencies = [ ed25519 ];
34   passthru.optional-dependencies = {
35     aiohttp = [ aiohttp ];
36     nkeys = [ nkeys ];
37     # fast_parse = [
38     #   fast-mail-parser
39     # ];
40   };
42   nativeCheckInputs = [
43     nats-server
44     pytestCheckHook
45     uvloop
46   ];
48   disabledTests =
49     [
50       # AssertionError: assert 5 == 0
51       "test_pull_subscribe_limits"
52       "test_fetch_n"
53       "test_subscribe_no_echo"
54       "test_stream_management"
55       # Tests fail on hydra, often Time-out
56       "test_subscribe_iterate_next_msg"
57       "test_ordered_consumer_larger_streams"
58       "test_object_file_basics"
59     ]
60     ++ lib.optionals stdenv.isDarwin [
61       "test_subscribe_iterate_next_msg"
62       "test_buf_size_force_flush_timeout"
63     ];
65   pythonImportsCheck = [ "nats" ];
67   meta = with lib; {
68     description = "Python client for NATS.io";
69     homepage = "https://github.com/nats-io/nats.py";
70     changelog = "https://github.com/nats-io/nats.py/releases/tag/v${version}";
71     license = with licenses; [ asl20 ];
72     maintainers = with maintainers; [ fab ];
73   };