nixpkgs-suyu/pkgs/servers/monitoring/prometheus/dmarc-metrics-exporter/default.nix
Guillaume Girol 33afbf39f6 treewide: switch to nativeCheckInputs
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
2023-01-21 12:00:00 +00:00

61 lines
1.4 KiB
Nix

{ lib
, python3
, fetchFromGitHub
}:
python3.pkgs.buildPythonApplication rec {
pname = "dmarc-metrics-exporter";
version = "0.9.0";
disabled = python3.pythonOlder "3.7";
format = "pyproject";
src = fetchFromGitHub {
owner = "jgosmann";
repo = "dmarc-metrics-exporter";
rev = "refs/tags/v${version}";
hash = "sha256-OUeTOnb9ZhdJWzO+Wzl+liv4u3mlbyJ4tWyCHU5loqc=";
};
pythonRelaxDeps = true;
nativeBuildInputs = with python3.pkgs; [
poetry-core
pythonRelaxDepsHook
];
propagatedBuildInputs = with python3.pkgs; [
bite-parser
dataclasses-serialization
prometheus-client
typing-extensions
uvicorn
xsdata
]
++ uvicorn.optional-dependencies.standard;
nativeCheckInputs = with python3.pkgs; [
aiohttp
pytest-asyncio
pytestCheckHook
requests
];
disabledTestPaths = [
# require networking
"dmarc_metrics_exporter/tests/test_e2e.py"
"dmarc_metrics_exporter/tests/test_imap_client.py"
"dmarc_metrics_exporter/tests/test_imap_queue.py"
];
pythonImportsCheck = [ "dmarc_metrics_exporter" ];
meta = {
description = "Export Prometheus metrics from DMARC reports";
homepage = "https://github.com/jgosmann/dmarc-metrics-exporter";
changelog = "https://github.com/jgosmann/dmarc-metrics-exporter/blob/v${version}/CHANGELOG.rst";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ ma27 ];
};
}