python313Packages.ipwhois: use libredirect.hook (#385608)

This commit is contained in:
Sandro
2025-02-28 16:41:28 +01:00
committed by GitHub
@@ -38,14 +38,16 @@ buildPythonPackage rec {
dnspython
];
nativeCheckInputs = [ pytestCheckHook ];
nativeCheckInputs = [
libredirect.hook
pytestCheckHook
];
pythonImportsCheck = [ "ipwhois" ];
preCheck = lib.optionalString stdenv.hostPlatform.isLinux ''
echo "nameserver 127.0.0.1" > resolv.conf
export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols:/etc/resolv.conf=$(realpath resolv.conf) \
LD_PRELOAD=${libredirect}/lib/libredirect.so
export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols:/etc/resolv.conf=$(realpath resolv.conf)
'';
disabledTestPaths = [