2021-09-18 10:52:07 +00:00
|
|
|
{ buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, fetchurl
|
|
|
|
, lib
|
|
|
|
, nixosTests
|
2022-06-16 17:23:12 +00:00
|
|
|
, python
|
|
|
|
, pythonOlder
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
# pythonPackages
|
|
|
|
, dnspython
|
|
|
|
, expiringdict
|
|
|
|
, publicsuffix2
|
|
|
|
, xmltodict
|
|
|
|
, geoip2
|
2022-06-16 17:23:12 +00:00
|
|
|
, urllib3
|
|
|
|
, requests
|
2021-12-06 16:07:01 +00:00
|
|
|
, imapclient
|
2021-09-18 10:52:07 +00:00
|
|
|
, dateparser
|
2022-06-16 17:23:12 +00:00
|
|
|
, mailsuite
|
|
|
|
, elasticsearch
|
2021-09-18 10:52:07 +00:00
|
|
|
, elasticsearch-dsl
|
|
|
|
, kafka-python
|
2022-06-16 17:23:12 +00:00
|
|
|
, tqdm
|
2021-09-18 10:52:07 +00:00
|
|
|
, lxml
|
|
|
|
, boto3
|
2022-06-16 17:23:12 +00:00
|
|
|
, msgraph-core
|
|
|
|
, azure-identity
|
|
|
|
, google-api-core
|
|
|
|
, google-api-python-client
|
|
|
|
, google-auth
|
|
|
|
, google-auth-httplib2
|
|
|
|
, google-auth-oauthlib
|
2021-09-18 10:52:07 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
dashboard = fetchurl {
|
|
|
|
url = "https://raw.githubusercontent.com/domainaware/parsedmarc/77331b55c54cb3269205295bd57d0ab680638964/grafana/Grafana-DMARC_Reports.json";
|
|
|
|
sha256 = "0wbihyqbb4ndjg79qs8088zgrcg88km8khjhv2474y7nzjzkf43i";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "parsedmarc";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "8.2.0";
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-06-16 17:23:12 +00:00
|
|
|
sha256 = "eb82328dffb4a62ddaefbcc22efd5a2694350504a56d41ba1e161f2d998dcbff";
|
2021-09-18 10:52:07 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "elasticsearch<7.14.0" "elasticsearch"
|
|
|
|
'';
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
dnspython
|
|
|
|
expiringdict
|
|
|
|
publicsuffix2
|
|
|
|
xmltodict
|
|
|
|
geoip2
|
2022-06-16 17:23:12 +00:00
|
|
|
urllib3
|
|
|
|
requests
|
2021-12-06 16:07:01 +00:00
|
|
|
imapclient
|
2021-09-18 10:52:07 +00:00
|
|
|
dateparser
|
2022-06-16 17:23:12 +00:00
|
|
|
mailsuite
|
|
|
|
elasticsearch
|
2021-09-18 10:52:07 +00:00
|
|
|
elasticsearch-dsl
|
|
|
|
kafka-python
|
2022-06-16 17:23:12 +00:00
|
|
|
tqdm
|
2021-09-18 10:52:07 +00:00
|
|
|
lxml
|
|
|
|
boto3
|
2022-06-16 17:23:12 +00:00
|
|
|
msgraph-core
|
|
|
|
azure-identity
|
|
|
|
google-api-core
|
|
|
|
google-api-python-client
|
|
|
|
google-auth
|
|
|
|
google-auth-httplib2
|
|
|
|
google-auth-oauthlib
|
2021-09-18 10:52:07 +00:00
|
|
|
];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
# no tests on PyPI, no tags on GitHub
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|