Merge pull request #330634 from r-ryantm/auto-update/circumflex
[NixPkgs.git] / pkgs / servers / monitoring / prometheus / dmarc-metrics-exporter / default.nix
blob0a5aa5f6f51403708e186af3fa62017c6444f5c4
1 { lib
2 , python3
3 , fetchFromGitHub
4 }:
6 python3.pkgs.buildPythonApplication rec {
7   pname = "dmarc-metrics-exporter";
8   version = "1.0.0";
10   disabled = python3.pythonOlder "3.8";
12   pyproject = true;
14   src = fetchFromGitHub {
15     owner = "jgosmann";
16     repo = "dmarc-metrics-exporter";
17     rev = "refs/tags/v${version}";
18     hash = "sha256-pT2GGoNPCHBZZbbBE93cJjgogBNcdpvLmrVakNMu6tY=";
19   };
21   pythonRelaxDeps = true;
23   nativeBuildInputs = with python3.pkgs; [
24     poetry-core
25   ];
27   propagatedBuildInputs = with python3.pkgs; [
28     bite-parser
29     dataclasses-serialization
30     prometheus-client
31     structlog
32     uvicorn
33     xsdata
34   ]
35   ++ uvicorn.optional-dependencies.standard;
37   nativeCheckInputs = with python3.pkgs; [
38     aiohttp
39     pytest-asyncio
40     pytestCheckHook
41     requests
42   ];
44   disabledTestPaths = [
45     # require networking
46     "dmarc_metrics_exporter/tests/test_e2e.py"
47     "dmarc_metrics_exporter/tests/test_imap_client.py"
48     "dmarc_metrics_exporter/tests/test_imap_queue.py"
49   ];
51   pythonImportsCheck = [ "dmarc_metrics_exporter" ];
53   meta = {
54     description = "Export Prometheus metrics from DMARC reports";
55     mainProgram = "dmarc-metrics-exporter";
56     homepage = "https://github.com/jgosmann/dmarc-metrics-exporter";
57     changelog = "https://github.com/jgosmann/dmarc-metrics-exporter/blob/v${version}/CHANGELOG.rst";
58     license = lib.licenses.mit;
59     maintainers = with lib.maintainers; [ ma27 ];
60   };