at 18.03-beta 1.7 kB view raw
1{ stdenv, fetchurl, openssl, makeWrapper, buildPythonApplication 2, pytest, dnspython }: 3 4buildPythonApplication rec { 5 name = "${pname}-${version}"; 6 pname = "dkimpy"; 7 majorversion = "0.6"; 8 minorversion = "2"; 9 version = "${majorversion}.${minorversion}"; 10 11 src = fetchurl { 12 url = "https://launchpad.net/${pname}/${majorversion}/${majorversion}.${minorversion}/+download/${name}.tar.gz"; 13 sha256 = "1hagz8qk0v4ijfbcdq4z28bpgr2mkpr498z76i1vam2d50chmakl"; 14 }; 15 16 buildInputs = [ pytest ]; 17 propagatedBuildInputs = [ openssl dnspython ]; 18 19 patchPhase = '' 20 substituteInPlace dknewkey.py --replace \ 21 /usr/bin/openssl ${openssl}/bin/openssl 22 ''; 23 24 checkPhase = '' 25 python ./test.py 26 ''; 27 28 postInstall = '' 29 mkdir -p $out/bin $out/libexec 30 mv $out/bin/*.py $out/libexec 31 makeWrapper "$out/libexec/dkimverify.py" $out/bin/dkimverify 32 makeWrapper "$out/libexec/dkimsign.py" $out/bin/dkimsign 33 makeWrapper "$out/libexec/arcverify.py" $out/bin/arcverify 34 makeWrapper "$out/libexec/arcsign.py" $out/bin/arcsign 35 makeWrapper "$out/libexec/dknewkey.py" $out/bin/dknewkey 36 ''; 37 38 meta = with stdenv.lib; { 39 description = "DKIM + ARC email signing/verification tools + Python module"; 40 longDescription = '' 41 Python module that implements DKIM (DomainKeys Identified Mail) email 42 signing and verification. It also provides a number of convєnient tools 43 for command line signing and verification, as well as generating new DKIM 44 records. This version also supports the experimental Authenticated 45 Received Chain (ARC) protocol. 46 ''; 47 homepage = https://launchpad.net/dkimpy; 48 license = licenses.bsd3; 49 maintainers = with maintainers; [ leenaars ]; 50 }; 51}