about summary refs log tree commit diff
path: root/pkgs/development/python-modules/amqtt
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2021-05-05 09:09:49 +0200
committerFabian Affolter <mail@fabian-affolter.ch>2021-05-05 09:09:49 +0200
commitc7fbb3e6b44d1bc4a0a19919a6e74c0cdc9adb98 (patch)
treefce836596c91274e25a1d9a4e916711f0a736dda /pkgs/development/python-modules/amqtt
parent39e6bf76474ce742eb027a88c4da6331f0a1526f (diff)
python3Packages.amqtt: init at 0.10.0-alpha.3
Diffstat (limited to 'pkgs/development/python-modules/amqtt')
-rw-r--r--pkgs/development/python-modules/amqtt/default.nix64
1 files changed, 64 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/amqtt/default.nix b/pkgs/development/python-modules/amqtt/default.nix
new file mode 100644
index 0000000000000..8ab0e7a7c0cc4
--- /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 ];
+  };
+}