nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 cryptography,
5 dnspython,
6 expiringdict,
7 fetchFromGitHub,
8 hatchling,
9 importlib-resources,
10 pem,
11 publicsuffixlist,
12 pyleri,
13 pyopenssl,
14 pytestCheckHook,
15 requests,
16 timeout-decorator,
17 xmltodict,
18}:
19
20buildPythonPackage (finalAttrs: {
21 pname = "checkdmarc";
22 version = "5.13.4";
23 pyproject = true;
24
25 src = fetchFromGitHub {
26 owner = "domainaware";
27 repo = "checkdmarc";
28 tag = finalAttrs.version;
29 hash = "sha256-Ve7kGCD/4NMAOGTULvCYt1NTicD8+gSgy5eu0dAu5RA=";
30 };
31
32 pythonRelaxDeps = [
33 "cryptography"
34 "xmltodict"
35 ];
36
37 build-system = [ hatchling ];
38
39 dependencies = [
40 cryptography
41 dnspython
42 expiringdict
43 importlib-resources
44 pem
45 publicsuffixlist
46 pyleri
47 pyopenssl
48 requests
49 timeout-decorator
50 xmltodict
51 ];
52
53 nativeCheckInputs = [ pytestCheckHook ];
54
55 pythonImportsCheck = [ "checkdmarc" ];
56
57 enabledTestPaths = [ "tests.py" ];
58
59 disabledTests = [
60 # Tests require network access
61 "testBIMI"
62 "testDMARCPctLessThan100Warning"
63 "testSPFMissingARecord"
64 "testSPFMissingMXRecord"
65 "testSplitSPFRecord"
66 "testTooManySPFDNSLookups"
67 "testTooManySPFVoidDNSLookups"
68 ];
69
70 meta = {
71 description = "Parser for SPF and DMARC DNS records";
72 homepage = "https://github.com/domainaware/checkdmarc";
73 changelog = "https://github.com/domainaware/checkdmarc/blob/${finalAttrs.src.tag}/CHANGELOG.md";
74 license = lib.licenses.asl20;
75 maintainers = with lib.maintainers; [ fab ];
76 mainProgram = "checkdmarc";
77 };
78})