2021-08-10 14:31:46 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, click
|
|
|
|
, fetchPypi
|
|
|
|
, flask
|
|
|
|
, isPy27
|
|
|
|
, nixosTests
|
2021-08-27 14:25:00 +00:00
|
|
|
, prometheus-client
|
2021-08-10 14:31:46 +00:00
|
|
|
, py-air-control
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
2020-12-07 07:45:13 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "py-air-control-exporter";
|
2021-09-22 15:38:15 +00:00
|
|
|
version = "0.3.1";
|
2020-12-07 07:45:13 +00:00
|
|
|
disabled = isPy27;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-09-22 15:38:15 +00:00
|
|
|
sha256 = "0cwhcyyjzc6wlj7jp5h7fcj1hl03wzrz1if3sg205kh2hfrzzlqq";
|
2020-12-07 07:45:13 +00:00
|
|
|
};
|
|
|
|
|
2021-08-10 14:31:46 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
click
|
|
|
|
flask
|
2021-08-27 14:25:00 +00:00
|
|
|
prometheus-client
|
2021-08-10 14:31:46 +00:00
|
|
|
py-air-control
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "py_air_control_exporter" ];
|
2020-12-07 07:45:13 +00:00
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
passthru.tests = { inherit (nixosTests.prometheus-exporters) py-air-control; };
|
|
|
|
|
2020-12-07 07:45:13 +00:00
|
|
|
meta = with lib; {
|
2021-08-10 14:31:46 +00:00
|
|
|
description = "Exports Air Quality Metrics to Prometheus";
|
2020-12-07 07:45:13 +00:00
|
|
|
homepage = "https://github.com/urbas/py-air-control-exporter";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ urbas ];
|
|
|
|
};
|
|
|
|
}
|