nixpkgs/pkgs/servers/monitoring/prometheus/kea-exporter.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
1020 B
Nix
Raw Normal View History

{ lib
, python3Packages
, fetchPypi
, nixosTests
}:
2020-06-27 11:00:28 +00:00
python3Packages.buildPythonApplication rec {
pname = "kea-exporter";
version = "0.7.0";
format = "pyproject";
2020-06-27 11:00:28 +00:00
src = fetchPypi {
pname = "kea_exporter";
inherit version;
hash = "sha256-kn2iwYWcyW90tgfWmzLF7rU06fJyLRzqYKNLOgu/Yqk=";
2020-06-27 11:00:28 +00:00
};
nativeBuildInputs = with python3Packages; [
pdm-backend
];
2020-06-27 11:00:28 +00:00
propagatedBuildInputs = with python3Packages; [
click
prometheus-client
requests
2020-06-27 11:00:28 +00:00
];
checkPhase = ''
$out/bin/kea-exporter --help > /dev/null
$out/bin/kea-exporter --version | grep -q ${version}
'';
passthru.tests = {
inherit (nixosTests) kea;
};
2020-06-27 11:00:28 +00:00
meta = with lib; {
changelog = "https://github.com/mweinelt/kea-exporter/blob/v${version}/HISTORY";
2020-06-27 11:00:28 +00:00
description = "Export Kea Metrics in the Prometheus Exposition Format";
mainProgram = "kea-exporter";
2020-06-27 11:00:28 +00:00
homepage = "https://github.com/mweinelt/kea-exporter";
license = licenses.mit;
maintainers = with maintainers; [ hexa ];
};
}