diff --git a/pkgs/development/python-modules/amqtt/default.nix b/pkgs/development/python-modules/amqtt/default.nix new file mode 100644 index 00000000000..8ab0e7a7c0c --- /dev/null +++ b/pkgs/development/python-modules/amqtt/default.nix @@ -0,0 +1,64 @@ +{ lib +, buildPythonPackage +, docopt +, fetchFromGitHub +, hypothesis +, passlib +, poetry-core +, pytest-asyncio +, pytestCheckHook +, pythonOlder +, pyyaml +, transitions +, websockets +}: + +buildPythonPackage rec { + pname = "amqtt"; + version = "0.10.0-alpha.3"; + format = "pyproject"; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "Yakifo"; + repo = pname; + rev = "v${version}"; + sha256 = "0wz85ykjgi2174qcdgpakmc4m0p96v62az7pvc9hyallq1v1k4n6"; + }; + + nativeBuildInputs = [ poetry-core ]; + + propagatedBuildInputs = [ + docopt + passlib + pyyaml + transitions + websockets + ]; + + checkInputs = [ + hypothesis + pytest-asyncio + pytestCheckHook + ]; + + disabledTestPaths = [ + # Test are not ported from hbmqtt yet + "tests/test_cli.py" + "tests/test_client.py" + ]; + + disabledTests = [ + # Requires network access + "test_connect_tcp" + ]; + + pythonImportsCheck = [ "amqtt" ]; + + meta = with lib; { + description = "Python MQTT client and broker implementation"; + homepage = "https://amqtt.readthedocs.io/"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 19d2a40dce6..37a1b725d35 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -383,6 +383,8 @@ in { amqplib = callPackage ../development/python-modules/amqplib { }; + amqtt = callPackage ../development/python-modules/amqtt { }; + android-backup = callPackage ../development/python-modules/android-backup { }; androidtv = callPackage ../development/python-modules/androidtv { };