diff --git a/pkgs/development/python-modules/aio-pika/default.nix b/pkgs/development/python-modules/aio-pika/default.nix new file mode 100644 index 000000000000..fddabeccd6a1 --- /dev/null +++ b/pkgs/development/python-modules/aio-pika/default.nix @@ -0,0 +1,56 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, pytestCheckHook +, aiormq +, yarl +, aiomisc +, shortuuid +}: + +buildPythonPackage rec { + pname = "aio-pika"; + version = "8.3.0"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "mosquito"; + repo = pname; + rev = version; + sha256 = "CYfj6V/91J7JA8YSctG/FkSHRkwyLKxr27eREbA+MtQ="; + }; + + propagatedBuildInputs = [ + aiormq + yarl + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + checkInputs = [ + aiomisc + shortuuid + ]; + # Tests attempt to connect to a RabbitMQ server + disabledTestPaths = [ + "tests/test_amqp.py" + "tests/test_amqp_robust.py" + "tests/test_amqp_robust_proxy.py" + "tests/test_amqps.py" + "tests/test_master.py" + "tests/test_memory_leak.py" + "tests/test_rpc.py" + "tests/test_types.py" + ]; + pythonImportsCheck = [ "aio_pika" ]; + + meta = with lib; { + description = "AMQP 0.9 client designed for asyncio and humans"; + homepage = "https://github.com/mosquito/aio-pika"; + license = licenses.asl20; + maintainers = with maintainers; [ emilytrau ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e6a8557e4d23..d8f97af50949 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -122,6 +122,8 @@ self: super: with self; { aio-georss-gdacs = callPackage ../development/python-modules/aio-georss-gdacs { }; + aio-pika = callPackage ../development/python-modules/aio-pika { }; + aioairzone = callPackage ../development/python-modules/aioairzone { }; aioairq = callPackage ../development/python-modules/aioairq { };