Files
nixpkgs/pkgs/development/python-modules/mqtt2influxdb/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

60 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
influxdb,
jsonpath-ng,
paho-mqtt,
py-expression-eval,
pyaml,
pycron,
pytestCheckHook,
schema,
setuptools,
}:
buildPythonPackage rec {
pname = "mqtt2influxdb";
version = "1.5.2";
pyproject = true;
src = fetchFromGitHub {
owner = "hardwario";
repo = "bch-mqtt2influxdb";
tag = "v${version}";
hash = "sha256-YDgMoxnH4vCCa7b857U6iVBhYLxk8ZjytGziryn24bg=";
};
postPatch = ''
substituteInPlace setup.py \
--replace-fail "find_version('mqtt2influxdb', '__init__.py')," "'${version}',"
'';
build-system = [ setuptools ];
dependencies = [
influxdb
jsonpath-ng
paho-mqtt
py-expression-eval
pyaml
pycron
schema
];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "mqtt2influxdb" ];
enabledTestPaths = [ "tests/test.py" ];
meta = {
description = "Flexible MQTT to InfluxDB Bridge";
homepage = "https://github.com/hardwario/bch-mqtt2influxdb";
changelog = "https://github.com/hardwario/bch-mqtt2influxdb/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ cynerd ];
mainProgram = "mqtt2influxdb";
};
}