From 29d9814e40312999cec7bef4470d7f0983afc8db Mon Sep 17 00:00:00 2001 From: Michiel Leenaars Date: Thu, 20 Apr 2017 20:22:21 +0200 Subject: [PATCH] dkimpy: init -> 0.6.1 --- .../python-modules/dkimpy/default.nix | 44 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + pkgs/top-level/python-packages.nix | 2 + 3 files changed, 48 insertions(+) create mode 100644 pkgs/development/python-modules/dkimpy/default.nix diff --git a/pkgs/development/python-modules/dkimpy/default.nix b/pkgs/development/python-modules/dkimpy/default.nix new file mode 100644 index 000000000000..df768f5d1222 --- /dev/null +++ b/pkgs/development/python-modules/dkimpy/default.nix @@ -0,0 +1,44 @@ +{ stdenv, fetchurl, openssl, makeWrapper, buildPythonApplication +, pytest, dns }: + +buildPythonApplication rec { + name = "${pname}-${majorversion}.${minorversion}"; + pname = "dkimpy"; + majorversion = "0.6"; + minorversion = "1"; + + src = fetchurl { + url = "https://launchpad.net/${pname}/${majorversion}/${majorversion}.${minorversion}/+download/${name}.tar.gz"; + sha256 = "0zmvyw18ww1jqrbqws636w3xki59fyqva553r6s74q5c4jvy36v2"; + }; + + buildInputs = [ pytest ]; + propagatedBuildInputs = [ openssl dns ]; + + patchPhase = ''substituteInPlace dknewkey.py --replace \ + /usr/bin/openssl ${openssl}/bin/openssl + ''; + + 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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 353cbc4e375d..9cb3fa50a0fd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -521,6 +521,8 @@ with pkgs; dgsh = callPackage ../shells/dgsh { }; + dkimpy = pythonPackages.dkimpy; + elvish = callPackage ../shells/elvish { }; encryptr = callPackage ../tools/security/encryptr { diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5bde08d5c12a..b8543c0558bf 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -222,6 +222,8 @@ in { }; }; + dkimpy = callPackage ../development/python-modules/dkimpy { }; + emcee = buildPythonPackage { name = "emcee-2.1.0"; src = pkgs.fetchurl {