mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
python312Packages.mqtt2influxdb: refactor (#356118)
This commit is contained in:
commit
7b51fa844a
@ -8,21 +8,31 @@
|
||||
py-expression-eval,
|
||||
pyaml,
|
||||
pycron,
|
||||
pytestCheckHook,
|
||||
schema,
|
||||
setuptools,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "mqtt2influxdb";
|
||||
version = "1.5.2";
|
||||
format = "setuptools";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hardwario";
|
||||
repo = "bch-mqtt2influxdb";
|
||||
rev = "v${version}";
|
||||
sha256 = "YDgMoxnH4vCCa7b857U6iVBhYLxk8ZjytGziryn24bg=";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-YDgMoxnH4vCCa7b857U6iVBhYLxk8ZjytGziryn24bg=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace-fail "find_version('mqtt2influxdb', '__init__.py')," "'${version}',"
|
||||
'';
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [
|
||||
influxdb
|
||||
jsonpath-ng
|
||||
paho-mqtt
|
||||
@ -32,14 +42,18 @@ buildPythonPackage rec {
|
||||
schema
|
||||
];
|
||||
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
|
||||
pythonImportsCheck = [ "mqtt2influxdb" ];
|
||||
|
||||
pytestFlagsArray = [ "tests/test.py" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/hardwario/bch-mqtt2influxdb";
|
||||
description = "Flexible MQTT to InfluxDB Bridge";
|
||||
mainProgram = "mqtt2influxdb";
|
||||
platforms = platforms.linux;
|
||||
homepage = "https://github.com/hardwario/bch-mqtt2influxdb";
|
||||
changelog = "https://github.com/hardwario/bch-mqtt2influxdb/releases/tag/v${version}";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ cynerd ];
|
||||
mainProgram = "mqtt2influxdb";
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user