summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/amqtt
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2021-05-24 09:55:24 -0500
committerRobin Gloster <mail@glob.in>2021-05-24 09:55:24 -0500
commit4bc5fbef9d159e143fb7e2c3231932e6e76f667c (patch)
treee2198f5c552e0667d838b8ec764ddb3a4d8f6dec /pkgs/development/python-modules/amqtt
parentjq: fix build with structured-attrs on darwin (diff)
parentMerge pull request #123802 from superherointj/package-virtmanager-bugfix (diff)
downloadnixpkgs-origin/structured-attrs.tar.gz
Merge remote-tracking branch 'upstream/master' into structured-attrsorigin/structured-attrs
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 000000000000..8ab0e7a7c0cc
--- /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 ];
+ };
+}