Unverified Commit 84ceb76b authored by Sandro Jäckel's avatar Sandro Jäckel
Browse files

python313Packages.ipwhois: use libredirect.hook

parent a36c8c9e
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -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 = [