mqtt-exporter: init at 1.5.0 (#360486)

This commit is contained in:
Aleksana 2024-12-01 18:32:26 +08:00 committed by GitHub
commit 1c7406ae55
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -0,0 +1,43 @@
{
lib,
python3,
fetchFromGitHub,
}:
python3.pkgs.buildPythonApplication rec {
pname = "mqtt-exporter";
version = "1.5.0";
pyproject = true;
src = fetchFromGitHub {
owner = "kpetremann";
repo = "mqtt-exporter";
rev = "refs/tags/v${version}";
hash = "sha256-3gUAiujfBXJpVailx8cMmSJS7l69XpE4UGK/aebcQqY=";
};
pythonRelaxDeps = [ "prometheus-client" ];
build-system = with python3.pkgs; [ setuptools ];
dependencies = with python3.pkgs; [
paho-mqtt_2
prometheus-client
];
nativeCheckInputs = with python3.pkgs; [
pytest-mock
pytestCheckHook
];
pythonImportsCheck = [ "mqtt_exporter" ];
meta = {
description = "Generic MQTT Prometheus exporter for IoT";
homepage = "https://github.com/kpetremann/mqtt-exporter";
changelog = "https://github.com/kpetremann/mqtt-exporter/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "mqtt-exporter";
};
}