2021-01-05 17:05:55 +00:00
|
|
|
{ buildPythonPackage, fetchPypi, flask, isPy27, lib, nixosTests
|
|
|
|
, prometheus_client, py-air-control, pytestCheckHook, pytestcov, pytestrunner
|
2021-06-04 09:07:49 +00:00
|
|
|
, setuptools-scm }:
|
2020-12-07 07:45:13 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "py-air-control-exporter";
|
2020-12-26 04:20:00 +00:00
|
|
|
version = "0.3.0";
|
2020-12-07 07:45:13 +00:00
|
|
|
disabled = isPy27;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-12-26 04:20:00 +00:00
|
|
|
sha256 = "ece2e446273542e5c0352c9d6e80d8279132c6ada3649c59e87a711448801a3b";
|
2020-12-07 07:45:13 +00:00
|
|
|
};
|
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
2020-12-07 07:45:13 +00:00
|
|
|
checkInputs = [ pytestCheckHook pytestcov pytestrunner ];
|
|
|
|
propagatedBuildInputs = [ flask prometheus_client py-air-control ];
|
|
|
|
|
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; {
|
|
|
|
description = "Exports Air Quality Metrics to Prometheus.";
|
|
|
|
homepage = "https://github.com/urbas/py-air-control-exporter";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ urbas ];
|
|
|
|
};
|
|
|
|
}
|