1{
2 lib,
3 fetchPypi,
4 openssl,
5 buildPythonPackage,
6 pytest,
7 dnspython,
8 pynacl,
9 authres,
10 python,
11}:
12
13buildPythonPackage rec {
14 pname = "dkimpy";
15 version = "1.1.8";
16 format = "setuptools";
17
18 src = fetchPypi {
19 inherit pname version;
20 hash = "sha256-tfYPtHu/XY12LxNLzqDDiOumtJg0KmgqIfFoZUUJS3c=";
21 };
22
23 nativeCheckInputs = [ pytest ];
24 propagatedBuildInputs = [
25 openssl
26 dnspython
27 pynacl
28 authres
29 ];
30
31 patchPhase = ''
32 substituteInPlace dkim/dknewkey.py --replace \
33 /usr/bin/openssl ${openssl}/bin/openssl
34 '';
35
36 checkPhase = ''
37 ${python.interpreter} ./test.py
38 '';
39
40 meta = with lib; {
41 description = "DKIM + ARC email signing/verification tools + Python module";
42 longDescription = ''
43 Python module that implements DKIM (DomainKeys Identified Mail) email
44 signing and verification. It also provides a number of convєnient tools
45 for command line signing and verification, as well as generating new DKIM
46 records. This version also supports the experimental Authenticated
47 Received Chain (ARC) protocol.
48 '';
49 homepage = "https://launchpad.net/dkimpy";
50 license = licenses.bsd3;
51 maintainers = with maintainers; [ leenaars ];
52 };
53}