2021-01-01 12:34:24 +00:00
|
|
|
{ buildPythonPackage, fetchPypi, flask, isPy27, lib, nixosTests
|
|
|
|
, prometheus_client, py-air-control, pytestCheckHook, pytestcov, pytestrunner
|
2021-06-03 10:09:11 +00:00
|
|
|
, setuptools-scm }:
|
2020-11-21 20:58:49 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "py-air-control-exporter";
|
2020-12-25 16:06:34 +00:00
|
|
|
version = "0.3.0";
|
2020-11-21 20:58:49 +00:00
|
|
|
disabled = isPy27;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-12-25 16:06:34 +00:00
|
|
|
sha256 = "ece2e446273542e5c0352c9d6e80d8279132c6ada3649c59e87a711448801a3b";
|
2020-11-21 20:58:49 +00:00
|
|
|
};
|
|
|
|
|
2021-06-03 10:09:11 +00:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
2020-11-21 20:58:49 +00:00
|
|
|
checkInputs = [ pytestCheckHook pytestcov pytestrunner ];
|
|
|
|
propagatedBuildInputs = [ flask prometheus_client py-air-control ];
|
|
|
|
|
2021-01-01 12:34:24 +00:00
|
|
|
passthru.tests = { inherit (nixosTests.prometheus-exporters) py-air-control; };
|
|
|
|
|
2020-11-21 20:58:49 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Exports Air Quality Metrics to Prometheus.";
|
|
|
|
homepage = "https://github.com/urbas/py-air-control-exporter";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ urbas ];
|
|
|
|
};
|
|
|
|
}
|