1{ 2 lib, 3 azure-identity, 4 azure-monitor-ingestion, 5 boto3, 6 buildPythonPackage, 7 dateparser, 8 dnspython, 9 elastic-transport, 10 elasticsearch, 11 elasticsearch-dsl, 12 expiringdict, 13 fetchPypi, 14 fetchurl, 15 geoip2, 16 google-api-core, 17 google-api-python-client, 18 google-auth, 19 google-auth-httplib2, 20 google-auth-oauthlib, 21 hatchling, 22 imapclient, 23 kafka-python-ng, 24 lxml, 25 mailsuite, 26 msgraph-core, 27 nixosTests, 28 opensearch-py, 29 publicsuffixlist, 30 pygelf, 31 pythonOlder, 32 requests, 33 tqdm, 34 xmltodict, 35}: 36 37let 38 dashboard = fetchurl { 39 url = "https://raw.githubusercontent.com/domainaware/parsedmarc/77331b55c54cb3269205295bd57d0ab680638964/grafana/Grafana-DMARC_Reports.json"; 40 sha256 = "0wbihyqbb4ndjg79qs8088zgrcg88km8khjhv2474y7nzjzkf43i"; 41 }; 42in 43buildPythonPackage rec { 44 pname = "parsedmarc"; 45 version = "8.18.1"; 46 pyproject = true; 47 48 disabled = pythonOlder "3.7"; 49 50 src = fetchPypi { 51 inherit pname version; 52 hash = "sha256-qE/WMovVlB9u0lyVl3HapHzvhG+fGTC+6DDBUKRU/2w="; 53 }; 54 55 nativeBuildInputs = [ 56 hatchling 57 ]; 58 59 pythonRelaxDeps = [ 60 "elasticsearch" 61 "elasticsearch-dsl" 62 ]; 63 64 propagatedBuildInputs = [ 65 azure-identity 66 azure-monitor-ingestion 67 boto3 68 dateparser 69 dnspython 70 elastic-transport 71 elasticsearch 72 elasticsearch-dsl 73 expiringdict 74 geoip2 75 google-api-core 76 google-api-python-client 77 google-auth 78 google-auth-httplib2 79 google-auth-oauthlib 80 imapclient 81 kafka-python-ng 82 lxml 83 mailsuite 84 msgraph-core 85 publicsuffixlist 86 pygelf 87 requests 88 tqdm 89 xmltodict 90 opensearch-py 91 ]; 92 93 # no tests on PyPI, no tags on GitHub 94 # https://github.com/domainaware/parsedmarc/issues/426 95 doCheck = false; 96 97 pythonImportsCheck = [ "parsedmarc" ]; 98 99 passthru = { 100 inherit dashboard; 101 tests = nixosTests.parsedmarc; 102 }; 103 104 meta = with lib; { 105 description = "Python module and CLI utility for parsing DMARC reports"; 106 homepage = "https://domainaware.github.io/parsedmarc/"; 107 changelog = "https://github.com/domainaware/parsedmarc/blob/master/CHANGELOG.md#${ 108 lib.replaceStrings [ "." ] [ "" ] version 109 }"; 110 license = licenses.asl20; 111 maintainers = with maintainers; [ talyz ]; 112 mainProgram = "parsedmarc"; 113 # https://github.com/domainaware/parsedmarc/issues/464 114 broken = lib.versionAtLeast msgraph-core.version "1.0.0"; 115 }; 116}