python313Packages.pymilter: remove unused libredirect, use substitute… (#385606)
This commit is contained in:
@@ -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
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user