2017-04-20 19:22:21 +01:00
|
|
|
{ stdenv, fetchurl, openssl, makeWrapper, buildPythonApplication
|
2017-12-10 02:15:45 +00:00
|
|
|
, pytest, dnspython }:
|
2017-04-20 19:22:21 +01:00
|
|
|
|
|
|
|
buildPythonApplication rec {
|
2017-11-09 11:26:09 +00:00
|
|
|
name = "${pname}-${version}";
|
2017-04-20 19:22:21 +01:00
|
|
|
pname = "dkimpy";
|
|
|
|
majorversion = "0.6";
|
2017-07-09 00:32:01 +01:00
|
|
|
minorversion = "2";
|
2017-11-09 11:26:09 +00:00
|
|
|
version = "${majorversion}.${minorversion}";
|
2017-04-20 19:22:21 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://launchpad.net/${pname}/${majorversion}/${majorversion}.${minorversion}/+download/${name}.tar.gz";
|
2017-07-09 00:32:01 +01:00
|
|
|
sha256 = "1hagz8qk0v4ijfbcdq4z28bpgr2mkpr498z76i1vam2d50chmakl";
|
2017-04-20 19:22:21 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ pytest ];
|
2017-12-10 02:15:45 +00:00
|
|
|
propagatedBuildInputs = [ openssl dnspython ];
|
2017-04-20 19:22:21 +01:00
|
|
|
|
2017-07-09 00:32:01 +01:00
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace dknewkey.py --replace \
|
|
|
|
/usr/bin/openssl ${openssl}/bin/openssl
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
python ./test.py
|
|
|
|
'';
|
2017-04-20 19:22:21 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/bin $out/libexec
|
|
|
|
mv $out/bin/*.py $out/libexec
|
|
|
|
makeWrapper "$out/libexec/dkimverify.py" $out/bin/dkimverify
|
|
|
|
makeWrapper "$out/libexec/dkimsign.py" $out/bin/dkimsign
|
|
|
|
makeWrapper "$out/libexec/arcverify.py" $out/bin/arcverify
|
|
|
|
makeWrapper "$out/libexec/arcsign.py" $out/bin/arcsign
|
|
|
|
makeWrapper "$out/libexec/dknewkey.py" $out/bin/dknewkey
|
2017-07-09 00:32:01 +01:00
|
|
|
'';
|
2017-04-20 19:22:21 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "DKIM + ARC email signing/verification tools + Python module";
|
2017-07-09 00:32:01 +01:00
|
|
|
longDescription = ''
|
|
|
|
Python module that implements DKIM (DomainKeys Identified Mail) email
|
|
|
|
signing and verification. It also provides a number of convєnient tools
|
|
|
|
for command line signing and verification, as well as generating new DKIM
|
|
|
|
records. This version also supports the experimental Authenticated
|
|
|
|
Received Chain (ARC) protocol.
|
2017-04-20 19:22:21 +01:00
|
|
|
'';
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = https://launchpad.net/dkimpy;
|
2017-04-20 19:22:21 +01:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ leenaars ];
|
|
|
|
};
|
|
|
|
}
|