{ lib, python3, fetchPypi, nixosTests, }: python3.pkgs.buildPythonApplication rec { pname = "knot-exporter"; version = "3.5.3"; pyproject = true; src = fetchPypi { pname = "knot_exporter"; inherit version; hash = "sha256-sCmzYS6mjEUHomA25HRxJs2X+9Uv50ll4tqR2BAj0ro="; }; build-system = [ python3.pkgs.hatchling ]; dependencies = with python3.pkgs; [ libknot prometheus-client psutil ]; pythonImportsCheck = [ "knot_exporter" ]; passthru.tests = { inherit (nixosTests.prometheus-exporters) knot; }; meta = { description = "Prometheus exporter for Knot DNS"; homepage = "https://gitlab.nic.cz/knot/knot-dns/-/tree/master/python/knot_exporter"; license = lib.licenses.gpl2Plus; maintainers = with lib.maintainers; [ ma27 hexa ]; mainProgram = "knot-exporter"; }; }