2024-01-25 14:12:00 +00:00
|
|
|
{ lib
|
|
|
|
, python3
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "fritz-exporter";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "2.5.0";
|
2024-01-25 14:12:00 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pdreker";
|
|
|
|
repo = "fritz_exporter";
|
|
|
|
rev = "fritzexporter-v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-x5WCVDIKdreQCmVpiWbmVBNo42P5kSxX9dLMBKfZTWc=";
|
2024-01-25 14:12:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# don't test coverage
|
|
|
|
sed -i "/^addopts/d" pyproject.toml
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = with python3.pkgs; [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
attrs
|
2024-04-21 15:54:59 +00:00
|
|
|
defusedxml
|
2024-01-25 14:12:00 +00:00
|
|
|
fritzconnection
|
|
|
|
prometheus-client
|
|
|
|
pyyaml
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = with python3.pkgs; [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
changelog = "https://github.com/pdreker/fritz_exporter/blob/${src.rev}/CHANGELOG.md";
|
|
|
|
description = "Prometheus exporter for Fritz!Box home routers";
|
|
|
|
homepage = "https://github.com/pdreker/fritz_exporter";
|
|
|
|
license = lib.licenses.asl20;
|
|
|
|
mainProgram = "fritzexporter";
|
|
|
|
maintainers = with lib.maintainers; [ marie ];
|
|
|
|
};
|
|
|
|
}
|