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, 24 lxml, 25 mailsuite, 26 msgraph-core, 27 nixosTests, 28 opensearch-py, 29 publicsuffixlist, 30 pythonOlder, 31 pythonRelaxDepsHook, 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.11.0"; 46 pyproject = true; 47 48 disabled = pythonOlder "3.7"; 49 50 src = fetchPypi { 51 inherit pname version; 52 hash = "sha256-OBxiaXB8NKNMviRI19rYYJxpnfnaEL3zSPmYB4urIug="; 53 }; 54 55 nativeBuildInputs = [ 56 hatchling 57 pythonRelaxDepsHook 58 ]; 59 60 pythonRelaxDeps = [ 61 "elasticsearch" 62 "elasticsearch-dsl" 63 ]; 64 65 propagatedBuildInputs = [ 66 azure-identity 67 azure-monitor-ingestion 68 boto3 69 dateparser 70 dnspython 71 elastic-transport 72 elasticsearch 73 elasticsearch-dsl 74 expiringdict 75 geoip2 76 google-api-core 77 google-api-python-client 78 google-auth 79 google-auth-httplib2 80 google-auth-oauthlib 81 imapclient 82 kafka-python 83 lxml 84 mailsuite 85 msgraph-core 86 publicsuffixlist 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}