about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/py-air-control-exporter/default.nix
blob: 6cf165d8b09377753f13ddbc5c2f5f42e5d74826 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{ lib
, buildPythonPackage
, click
, fetchPypi
, flask
, isPy27
, nixosTests
, prometheus-client
, py-air-control
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "py-air-control-exporter";
  version = "0.3.1";
  format = "setuptools";
  disabled = isPy27;

  src = fetchPypi {
    inherit pname version;
    sha256 = "0cwhcyyjzc6wlj7jp5h7fcj1hl03wzrz1if3sg205kh2hfrzzlqq";
  };

  propagatedBuildInputs = [
    click
    flask
    prometheus-client
    py-air-control
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  pythonImportsCheck = [ "py_air_control_exporter" ];

  passthru.tests = { inherit (nixosTests.prometheus-exporters) py-air-control; };

  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 ];
  };
}