summary refs log tree commit diff
path: root/pkgs/development/python-modules/parsedmarc/default.nix
blob: 7cba1c227a85255e3fbf330d6efdf74a77b5a010 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
{ buildPythonPackage
, fetchPypi
, fetchurl
, pythonOlder
, lib
, nixosTests

# pythonPackages
, tqdm
, dnspython
, expiringdict
, urllib3
, requests
, publicsuffix2
, xmltodict
, geoip2
, imapclient
, dateparser
, elasticsearch-dsl
, kafka-python
, mailsuite
, lxml
, boto3
}:

let
  dashboard = fetchurl {
    url = "https://raw.githubusercontent.com/domainaware/parsedmarc/77331b55c54cb3269205295bd57d0ab680638964/grafana/Grafana-DMARC_Reports.json";
    sha256 = "0wbihyqbb4ndjg79qs8088zgrcg88km8khjhv2474y7nzjzkf43i";
  };
in
buildPythonPackage rec {
  pname = "parsedmarc";
  version = "7.0.1";

  disabled = pythonOlder "3.7";

  src = fetchPypi {
    inherit pname version;
    sha256 = "1mi4hx410y7ikpfy1582lm252si0c3yryj0idqgqbx417fm21jjc";
  };

  propagatedBuildInputs = [
    tqdm
    dnspython
    expiringdict
    urllib3
    requests
    publicsuffix2
    xmltodict
    geoip2
    imapclient
    dateparser
    elasticsearch-dsl
    kafka-python
    mailsuite
    lxml
    boto3
  ];

  pythonImportsCheck = [ "parsedmarc" ];

  passthru = {
    inherit dashboard;
    tests = nixosTests.parsedmarc;
  };

  meta = {
    description = "Python module and CLI utility for parsing DMARC reports";
    homepage = "https://domainaware.github.io/parsedmarc/";
    maintainers = with lib.maintainers; [ talyz ];
    license = lib.licenses.asl20;
  };
}