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