From 91f78faa40a3617e8f17a86f1d78f2bf3436eac3 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 3 Feb 2021 21:28:54 +0100 Subject: [PATCH] python3Packages.asyncio-mqtt: init at 0.8.0 --- .../python-modules/asyncio_mqtt/default.nix | 34 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/development/python-modules/asyncio_mqtt/default.nix diff --git a/pkgs/development/python-modules/asyncio_mqtt/default.nix b/pkgs/development/python-modules/asyncio_mqtt/default.nix new file mode 100644 index 000000000000..088681a19895 --- /dev/null +++ b/pkgs/development/python-modules/asyncio_mqtt/default.nix @@ -0,0 +1,34 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchPypi +, async_generator +, paho-mqtt +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "asyncio_mqtt"; + version = "0.8.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "0hwfgww1ywhjvkpnvafbk2hxlqkrngfdz0sx5amzw68srzazvl6g"; + }; + + propagatedBuildInputs = [ + paho-mqtt + ] ++ lib.optional (pythonOlder "3.7") async_generator; + + doCheck = false; # no tests + + pythonImportsCheck = [ "asyncio_mqtt" ]; + + meta = with lib; { + description = "Idomatic asyncio wrapper around paho-mqtt"; + homepage = "https://github.com/sbtinstruments/asyncio-mqtt"; + license = licenses.bsd3; + changelog = "https://github.com/sbtinstruments/asyncio-mqtt/blob/master/CHANGELOG.md"; + maintainers = with maintainers; [ hexa ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 315e9202da00..3c020a285db8 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -484,6 +484,8 @@ in { asyncio-dgram = callPackage ../development/python-modules/asyncio-dgram { }; + asyncio-mqtt = callPackage ../development/python-modules/asyncio_mqtt { }; + asyncio-throttle = callPackage ../development/python-modules/asyncio-throttle { }; asyncpg = callPackage ../development/python-modules/asyncpg { };