2023-11-16 04:20:00 +00:00
|
|
|
{ lib
|
|
|
|
, azure-identity
|
|
|
|
, azure-monitor-ingestion
|
|
|
|
, boto3
|
|
|
|
, buildPythonPackage
|
2021-09-18 10:52:07 +00:00
|
|
|
, dateparser
|
2023-11-16 04:20:00 +00:00
|
|
|
, dnspython
|
2024-01-25 14:12:00 +00:00
|
|
|
, elastic-transport
|
2022-06-16 17:23:12 +00:00
|
|
|
, elasticsearch
|
2021-09-18 10:52:07 +00:00
|
|
|
, elasticsearch-dsl
|
2023-11-16 04:20:00 +00:00
|
|
|
, expiringdict
|
|
|
|
, fetchPypi
|
|
|
|
, fetchurl
|
|
|
|
, geoip2
|
2022-06-16 17:23:12 +00:00
|
|
|
, google-api-core
|
|
|
|
, google-api-python-client
|
|
|
|
, google-auth
|
|
|
|
, google-auth-httplib2
|
|
|
|
, google-auth-oauthlib
|
2023-11-16 04:20:00 +00:00
|
|
|
, hatchling
|
|
|
|
, imapclient
|
|
|
|
, kafka-python
|
|
|
|
, lxml
|
|
|
|
, mailsuite
|
|
|
|
, msgraph-core
|
|
|
|
, nixosTests
|
|
|
|
, publicsuffixlist
|
|
|
|
, pythonOlder
|
|
|
|
, requests
|
|
|
|
, tqdm
|
|
|
|
, urllib3
|
|
|
|
, xmltodict
|
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";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "8.6.4";
|
|
|
|
pyproject = true;
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-ibxSp1M85WngQKdjlRC4JvLxn0rEn9oVkid/V4iD6zY=";
|
2021-09-18 10:52:07 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
postPatch = ''
|
2023-03-15 16:39:30 +00:00
|
|
|
substituteInPlace pyproject.toml \
|
2024-01-25 14:12:00 +00:00
|
|
|
--replace "elasticsearch<7.14.0" "elasticsearch" \
|
|
|
|
--replace "elasticsearch-dsl==7.4.0" "elasticsearch-dsl"
|
2022-06-16 17:23:12 +00:00
|
|
|
'';
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
hatchling
|
|
|
|
];
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
propagatedBuildInputs = [
|
2023-11-16 04:20:00 +00:00
|
|
|
azure-identity
|
|
|
|
azure-monitor-ingestion
|
|
|
|
boto3
|
2021-09-18 10:52:07 +00:00
|
|
|
dateparser
|
2023-11-16 04:20:00 +00:00
|
|
|
dnspython
|
2024-01-25 14:12:00 +00:00
|
|
|
elastic-transport
|
2022-06-16 17:23:12 +00:00
|
|
|
elasticsearch
|
2021-09-18 10:52:07 +00:00
|
|
|
elasticsearch-dsl
|
2023-11-16 04:20:00 +00:00
|
|
|
expiringdict
|
|
|
|
geoip2
|
2022-06-16 17:23:12 +00:00
|
|
|
google-api-core
|
|
|
|
google-api-python-client
|
|
|
|
google-auth
|
|
|
|
google-auth-httplib2
|
|
|
|
google-auth-oauthlib
|
2023-11-16 04:20:00 +00:00
|
|
|
imapclient
|
|
|
|
kafka-python
|
|
|
|
lxml
|
|
|
|
mailsuite
|
|
|
|
msgraph-core
|
|
|
|
publicsuffixlist
|
|
|
|
requests
|
|
|
|
tqdm
|
|
|
|
urllib3
|
|
|
|
xmltodict
|
2021-09-18 10:52:07 +00:00
|
|
|
];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
# no tests on PyPI, no tags on GitHub
|
2023-11-16 04:20:00 +00:00
|
|
|
# https://github.com/domainaware/parsedmarc/issues/426
|
2022-06-16 17:23:12 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"parsedmarc"
|
|
|
|
];
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
passthru = {
|
|
|
|
inherit dashboard;
|
|
|
|
tests = nixosTests.parsedmarc;
|
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
meta = with lib; {
|
2021-09-18 10:52:07 +00:00
|
|
|
description = "Python module and CLI utility for parsing DMARC reports";
|
|
|
|
homepage = "https://domainaware.github.io/parsedmarc/";
|
2024-01-25 14:12:00 +00:00
|
|
|
changelog = "https://github.com/domainaware/parsedmarc/blob/master/CHANGELOG.md#${lib.replaceStrings [ "." ] [ "" ] version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
license = licenses.asl20;
|
2024-01-25 14:12:00 +00:00
|
|
|
maintainers = with maintainers; [ talyz ];
|
|
|
|
mainProgram = "parsedmarc";
|
2021-09-18 10:52:07 +00:00
|
|
|
};
|
|
|
|
}
|