nixpkgs/pkgs/development/python-modules/py-air-control-exporter/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

47 lines
949 B
Nix

{ 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";
mainProgram = "py-air-control-exporter";
homepage = "https://github.com/urbas/py-air-control-exporter";
license = licenses.mit;
maintainers = with maintainers; [ urbas ];
};
}