vscode-extensions.yoavbls.pretty-ts-errors: 0.5.4 -> 0.6.1 (#363464)
[NixPkgs.git] / pkgs / by-name / dm / dmarc-metrics-exporter / package.nix
blob369dd3548d3699e7407151050a6d592d3700ac76
2   lib,
3   stdenv,
4   python3,
5   fetchFromGitHub,
6 }:
8 python3.pkgs.buildPythonApplication rec {
9   pname = "dmarc-metrics-exporter";
10   version = "1.2.0";
12   pyproject = true;
14   src = fetchFromGitHub {
15     owner = "jgosmann";
16     repo = "dmarc-metrics-exporter";
17     tag = "v${version}";
18     hash = "sha256-cIsI4TNYuLK0fpUg9lnbl5KSBtzQoT/pTByI9hiy/7o=";
19   };
21   pythonRelaxDeps = true;
23   build-system = with python3.pkgs; [
24     poetry-core
25   ];
27   dependencies =
28     with python3.pkgs;
29     [
30       bite-parser
31       dataclasses-serialization
32       prometheus-client
33       structlog
34       uvicorn
35       xsdata
36     ]
37     ++ uvicorn.optional-dependencies.standard;
39   nativeCheckInputs = with python3.pkgs; [
40     aiohttp
41     pytest-asyncio
42     pytestCheckHook
43     requests
44   ];
46   disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
47     # flaky tests
48     "test_build_info"
49     "test_prometheus_exporter"
50   ];
52   disabledTestPaths = [
53     # require networking
54     "dmarc_metrics_exporter/tests/test_e2e.py"
55     "dmarc_metrics_exporter/tests/test_imap_client.py"
56     "dmarc_metrics_exporter/tests/test_imap_queue.py"
57   ];
59   pythonImportsCheck = [ "dmarc_metrics_exporter" ];
61   meta = {
62     description = "Export Prometheus metrics from DMARC reports";
63     mainProgram = "dmarc-metrics-exporter";
64     homepage = "https://github.com/jgosmann/dmarc-metrics-exporter";
65     changelog = "https://github.com/jgosmann/dmarc-metrics-exporter/blob/v${version}/CHANGELOG.rst";
66     license = lib.licenses.mit;
67     maintainers = with lib.maintainers; [ ma27 ];
68   };