diff --git a/pkgs/development/python-modules/pymilter/default.nix b/pkgs/development/python-modules/pymilter/default.nix index 60f00f40464f..eaeb815b55b9 100644 --- a/pkgs/development/python-modules/pymilter/default.nix +++ b/pkgs/development/python-modules/pymilter/default.nix @@ -5,8 +5,6 @@ libmilter, berkeleydb, py3dns, - iana-etc, - libredirect, pyasyncore, setuptools, }: @@ -26,24 +24,26 @@ buildPythonPackage rec { build-system = [ setuptools ]; + buildInputs = [ libmilter ]; - nativeCheckInputs = [ pyasyncore ]; + + nativeCheckInputs = [ + pyasyncore + ]; + dependencies = [ berkeleydb py3dns ]; preBuild = '' - sed -i 's/import thread/import _thread as thread/' Milter/greylist.py + substituteInPlace Milter/greylist.py \ + --replace-fail "import thread" "import _thread as thread" ''; - # requires /etc/resolv.conf # testpolicy: requires makemap (#100419) # using exec -a makemap smtpctl results in "unknown group smtpq" preCheck = '' - echo "nameserver 127.0.0.1" > resolv.conf - export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols:/etc/resolv.conf=$(realpath resolv.conf) - export LD_PRELOAD=${libredirect}/lib/libredirect.so sed -i '/testpolicy/d' test.py rm testpolicy.py '';