1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 19:51:17 +00:00

pimilter: fix some tests using libredirect

This commit is contained in:
Yorick van Pelt 2022-10-11 13:01:23 +02:00
parent 37cc873ac8
commit 46b4a9d74a
No known key found for this signature in database
GPG key ID: A36E70F9DC014A15

View file

@ -1,4 +1,4 @@
{ lib, python, buildPythonPackage, fetchFromGitHub, libmilter, bsddb3, pydns }:
{ lib, python, buildPythonPackage, fetchFromGitHub, libmilter, bsddb3, pydns, iana-etc, libredirect }:
buildPythonPackage rec {
pname = "pymilter";
@ -19,7 +19,15 @@ buildPythonPackage rec {
'';
# requires /etc/resolv.conf
doCheck = false;
# 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
'';
meta = with lib; {
homepage = "http://bmsi.com/python/milter.html";