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