commit 38b02549e68e2a4b81c506ec5309516540c63824
parent b2ad14b330ac261d6cdb1313467a8e11c634c605
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date: Sat, 22 Feb 2025 22:47:21 +0400
Add amqtt
Diffstat:
2 files changed, 56 insertions(+), 0 deletions(-)
diff --git a/pkgs/default.nix b/pkgs/default.nix
@@ -428,6 +428,7 @@ lib.makeScope newScope (
### MQTT
+ amqtt = callPackage ./mqtt/amqtt { };
comqtt = callPackage ./mqtt/comqtt { };
emitter = callPackage ./mqtt/emitter { };
go-mqtt-to-influxdb = callPackage ./mqtt/go-mqtt-to-influxdb { };
diff --git a/pkgs/mqtt/amqtt/default.nix b/pkgs/mqtt/amqtt/default.nix
@@ -0,0 +1,55 @@
+{
+ lib,
+ fetchFromGitHub,
+ python3Packages,
+}:
+
+python3Packages.buildPythonApplication rec {
+ pname = "amqtt";
+ version = "0.10.1-unstable-2025-01-08";
+ pyproject = true;
+
+ src = fetchFromGitHub {
+ owner = "Yakifo";
+ repo = "amqtt";
+ rev = "440e8ff945bf83c262f3a9d16be2f014fce6265c";
+ hash = "sha256-ZFXIYgjNnYqBLLdYgxDpG9JG7weuY3vlHC4pwZlFsh0=";
+ };
+
+ build-system = with python3Packages; [ poetry-core ];
+
+ dependencies = with python3Packages; [
+ docopt
+ passlib
+ pyyaml
+ transitions
+ websockets
+ ];
+
+ pythonRelaxDeps = [
+ "transitions"
+ "websockets"
+ ];
+
+ doCheck = false;
+
+ nativeCheckInputs = with python3Packages; [
+ hypothesis
+ psutil
+ pytest-asyncio
+ pytest-cov-stub
+ pytest-logdog
+ pytestCheckHook
+ ];
+
+ pythonImportsCheck = [ "amqtt" ];
+
+ __darwinAllowLocalNetworking = true;
+
+ meta = {
+ description = "MQTT client/broker using Python asyncio";
+ homepage = "https://github.com/Yakifo/amqtt";
+ license = lib.licenses.mit;
+ maintainers = [ lib.maintainers.sikmir ];
+ };
+}