60f07311b9
GitOrigin-RevId: f8e2ebd66d097614d51a56a755450d4ae1632df1
77 lines
1.4 KiB
Nix
77 lines
1.4 KiB
Nix
{ lib
|
|
, stdenv
|
|
, aiohttp
|
|
, buildPythonPackage
|
|
, ed25519
|
|
, fetchFromGitHub
|
|
, nats-server
|
|
, nkeys
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, setuptools
|
|
, uvloop
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "nats-py";
|
|
version = "2.7.0";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "nats-io";
|
|
repo = "nats.py";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-spKz0rKTI8hWdO6r8VLtP3G8tS9ANsjYRbinXOARCOQ=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
setuptools
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
ed25519
|
|
];
|
|
|
|
passthru.optional-dependencies = {
|
|
aiohttp = [
|
|
aiohttp
|
|
];
|
|
nkeys = [
|
|
nkeys
|
|
];
|
|
# fast_parse = [
|
|
# fast-mail-parser
|
|
# ];
|
|
};
|
|
|
|
nativeCheckInputs = [
|
|
nats-server
|
|
pytestCheckHook
|
|
uvloop
|
|
];
|
|
|
|
disabledTests = [
|
|
# AssertionError: assert 5 == 0
|
|
"test_pull_subscribe_limits"
|
|
"test_fetch_n"
|
|
"test_subscribe_no_echo"
|
|
"test_stream_management"
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
"test_subscribe_iterate_next_msg"
|
|
"test_buf_size_force_flush_timeout"
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"nats"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Python client for NATS.io";
|
|
homepage = "https://github.com/nats-io/nats.py";
|
|
changelog = "https://github.com/nats-io/nats.py/releases/tag/v${version}";
|
|
license = with licenses; [ asl20 ];
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|