Unverified Commit 1a6fbde5 authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

python3Packages.mqtt2influxdb: fix build (#501464)

parents 97d3faf9 33b45ad1
Loading
Loading
Loading
Loading
+8 −9
Original line number Diff line number Diff line
@@ -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";