about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pymilter/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/pymilter/default.nix')
-rw-r--r--pkgs/development/python-modules/pymilter/default.nix27
1 files changed, 25 insertions, 2 deletions
diff --git a/pkgs/development/python-modules/pymilter/default.nix b/pkgs/development/python-modules/pymilter/default.nix
index be0ee9bd2bc45..d26e354d54b27 100644
--- a/pkgs/development/python-modules/pymilter/default.nix
+++ b/pkgs/development/python-modules/pymilter/default.nix
@@ -1,4 +1,16 @@
-{ lib, python, buildPythonPackage, fetchFromGitHub, libmilter, bsddb3, pydns, iana-etc, libredirect }:
+{
+  lib,
+  python,
+  buildPythonPackage,
+  fetchFromGitHub,
+  fetchpatch,
+  libmilter,
+  bsddb3,
+  pydns,
+  iana-etc,
+  libredirect,
+  pyasyncore,
+}:
 
 buildPythonPackage rec {
   pname = "pymilter";
@@ -13,7 +25,18 @@ buildPythonPackage rec {
   };
 
   buildInputs = [ libmilter ];
-  propagatedBuildInputs = [ bsddb3 pydns ];
+  nativeCheckInputs = [ pyasyncore ];
+  propagatedBuildInputs = [
+    bsddb3
+    pydns
+  ];
+  patches = [
+    (fetchpatch {
+      name = "Remove-calls-to-the-deprecated-method-assertEquals";
+      url = "https://github.com/sdgathman/pymilter/pull/57.patch";
+      hash = "sha256-/5LlDR15nMR3l7rkVjT3w4FbDTFAAgNdERWlPNL2TVg=";
+    })
+  ];
 
   preBuild = ''
     sed -i 's/import thread/import _thread as thread/' Milter/greylist.py