1{
2 lib,
3 authres,
4 buildPythonPackage,
5 dkimpy,
6 dnspython,
7 fetchFromGitHub,
8 publicsuffix2,
9 pytestCheckHook,
10 pythonOlder,
11 setuptools,
12}:
13
14buildPythonPackage rec {
15 pname = "authheaders";
16 version = "0.16.3";
17 pyproject = true;
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "ValiMail";
23 repo = "authentication-headers";
24 tag = version;
25 hash = "sha256-BFMZpSJ4qCEL42xTiM/D5dkatxohiCrOWAkNZHFUhac=";
26 };
27
28 build-system = [ setuptools ];
29
30 dependencies = [
31 authres
32 dnspython
33 dkimpy
34 publicsuffix2
35 setuptools
36 ];
37
38 nativeCheckInputs = [ pytestCheckHook ];
39
40 pythonImportsCheck = [ "authheaders" ];
41
42 disabledTests = [
43 # Test fails with timeout even if the resolv.conf hack is present
44 "test_authenticate_dmarc_psdsub"
45 ];
46
47 meta = with lib; {
48 description = "Python library for the generation of email authentication headers";
49 homepage = "https://github.com/ValiMail/authentication-headers";
50 changelog = "https://github.com/ValiMail/authentication-headers/blob${version}/CHANGES";
51 license = licenses.mit;
52 maintainers = [ ];
53 mainProgram = "dmarc-policy-find";
54 };
55}