3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/dkimpy/default.nix
Frederik Rietdijk ced21f5e1a pythonPackages: remove name attribute`
The `buildPython*` function computes name from `pname` and `version`.
This change removes `name` attribute from all expressions in
`pkgs/development/python-modules`.

While at it, some other minor changes were made as well, such as
replacing `fetchurl` calls with `fetchPypi`.
2018-06-23 18:14:26 +02:00

52 lines
1.7 KiB
Nix

{ stdenv, fetchurl, openssl, makeWrapper, buildPythonApplication
, pytest, dnspython }:
let
majorversion = "0.6";
minorversion = "2";
in buildPythonApplication rec {
pname = "dkimpy";
version = "${majorversion}.${minorversion}";
src = fetchurl {
url = "https://launchpad.net/${pname}/${majorversion}/${majorversion}.${minorversion}/+download/${pname}-${version}.tar.gz";
sha256 = "1hagz8qk0v4ijfbcdq4z28bpgr2mkpr498z76i1vam2d50chmakl";
};
checkInputs = [ pytest ];
propagatedBuildInputs = [ openssl dnspython ];
patchPhase = ''
substituteInPlace dknewkey.py --replace \
/usr/bin/openssl ${openssl}/bin/openssl
'';
checkPhase = ''
python ./test.py
'';
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
'';
meta = with stdenv.lib; {
description = "DKIM + ARC email signing/verification tools + Python module";
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.
'';
homepage = https://launchpad.net/dkimpy;
license = licenses.bsd3;
maintainers = with maintainers; [ leenaars ];
};
}