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.2";
17 pyproject = true;
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "ValiMail";
23 repo = "authentication-headers";
24 rev = "refs/tags/${version}";
25 hash = "sha256-/vxUUSWwysYQzcy2AmkF4f8R59FHRnBfFlPRpfM9e5o=";
26 };
27
28 nativeBuildInputs = [ setuptools ];
29
30 propagatedBuildInputs = [
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 mainProgram = "dmarc-policy-find";
50 homepage = "https://github.com/ValiMail/authentication-headers";
51 changelog = "https://github.com/ValiMail/authentication-headers/blob${version}/CHANGES";
52 license = licenses.mit;
53 maintainers = with maintainers; [ ];
54 };
55}