2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchurl
|
|
|
|
, libasyncns
|
|
|
|
, pkg-config
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "libasyncns-python";
|
|
|
|
version = "0.7.1";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://launchpad.net/libasyncns-python/trunk/${version}/+download/libasyncns-python-${version}.tar.bz2";
|
|
|
|
sha256 = "1q4l71b2h9q756x4pjynp6kczr2d8c1jvbdp982hf7xzv7w5gxqg";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./libasyncns-fix-res-consts.patch ];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
postPatch = lib.optionalString stdenv.isDarwin ''
|
|
|
|
substituteInPlace resquery.c \
|
|
|
|
--replace '<arpa/nameser.h>' '<arpa/nameser_compat.h>'
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ libasyncns ];
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = false; # requires network access
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pythonImportsCheck = [ "libasyncns" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "libasyncns-python is a python binding for the asynchronous name service query library";
|
|
|
|
license = licenses.lgpl21;
|
|
|
|
maintainers = [ maintainers.mic92 ];
|
|
|
|
homepage = "https://launchpad.net/libasyncns-python";
|
|
|
|
};
|
|
|
|
}
|