From 9e89a503195a26ee7ef3fa33de2cedc24bc63cfd Mon Sep 17 00:00:00 2001 From: Charlotte Van Petegem Date: Sun, 23 Jun 2024 11:35:16 +0200 Subject: [PATCH] patches: Add fix for pymilter build --- patches/321446.patch | 48 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 patches/321446.patch diff --git a/patches/321446.patch b/patches/321446.patch new file mode 100644 index 00000000..d7a12177 --- /dev/null +++ b/patches/321446.patch @@ -0,0 +1,48 @@ +diff --git a/pkgs/development/python-modules/pymilter/default.nix b/pkgs/development/python-modules/pymilter/default.nix +index 32b7cfcc9bbcd6..6d9338dbc1b90e 100644 +--- a/pkgs/development/python-modules/pymilter/default.nix ++++ b/pkgs/development/python-modules/pymilter/default.nix +@@ -3,9 +3,8 @@ + python, + buildPythonPackage, + fetchFromGitHub, +- fetchpatch, + libmilter, +- bsddb3, ++ berkeleydb, + pydns, + iana-etc, + libredirect, +@@ -14,29 +13,22 @@ + + buildPythonPackage rec { + pname = "pymilter"; +- version = "1.0.5"; ++ version = "1.0.6"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "sdgathman"; + repo = pname; + rev = "${pname}-${version}"; +- hash = "sha256-gZUWEDVZfDRiOOdG3lpiQldHxm/93l8qYVOHOEpHhzQ="; ++ hash = "sha256-plaWXwDAIsVzEtrabZuZj7T4WNfz2ntQHgcMCVf5S70="; + }; + + buildInputs = [ libmilter ]; + nativeCheckInputs = [ pyasyncore ]; + propagatedBuildInputs = [ +- bsddb3 ++ berkeleydb + pydns + ]; +- patches = [ +- (fetchpatch { # https://github.com/sdgathman/pymilter/pull/57 +- name = "Remove-calls-to-the-deprecated-method-assertEquals"; +- url = "https://github.com/sdgathman/pymilter/commit/1ead9028fc63ae3ec6ea3b0c438e6ed088a2b20e.patch"; +- hash = "sha256-/5LlDR15nMR3l7rkVjT3w4FbDTFAAgNdERWlPNL2TVg="; +- }) +- ]; + + preBuild = '' + sed -i 's/import thread/import _thread as thread/' Milter/greylist.py