From 33b45ad1d45f5556220ed307d6f4c202ccffea1a Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Fri, 20 Mar 2026 00:59:39 +0100 Subject: [PATCH] python3Packages.mqtt2influxdb: fix build --- .../python-modules/mqtt2influxdb/default.nix | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/mqtt2influxdb/default.nix b/pkgs/development/python-modules/mqtt2influxdb/default.nix index 23882c552314..e950291e1db0 100644 --- a/pkgs/development/python-modules/mqtt2influxdb/default.nix +++ b/pkgs/development/python-modules/mqtt2influxdb/default.nix @@ -10,7 +10,10 @@ pycron, pytestCheckHook, schema, - setuptools, + hatchling, + click, + influxdb3-python, + pydantic, }: buildPythonPackage rec { @@ -25,12 +28,7 @@ buildPythonPackage rec { hash = "sha256-DS1k3JcTUK0yXRkJSFMeIZHSXpiIgSXJPZb3+72Wqko="; }; - postPatch = '' - substituteInPlace setup.py \ - --replace-fail "find_version('mqtt2influxdb', '__init__.py')," "'${version}'," - ''; - - build-system = [ setuptools ]; + build-system = [ hatchling ]; dependencies = [ influxdb @@ -40,14 +38,15 @@ buildPythonPackage rec { pyaml pycron schema + click + influxdb3-python + pydantic ]; nativeCheckInputs = [ pytestCheckHook ]; pythonImportsCheck = [ "mqtt2influxdb" ]; - enabledTestPaths = [ "tests/test.py" ]; - meta = { description = "Flexible MQTT to InfluxDB Bridge"; homepage = "https://github.com/hardwario/bch-mqtt2influxdb";