at master 1.0 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchurl, 6 libasyncns, 7 pkg-config, 8}: 9 10buildPythonPackage rec { 11 pname = "libasyncns-python"; 12 version = "0.7.1"; 13 format = "setuptools"; 14 15 src = fetchurl { 16 url = "https://launchpad.net/libasyncns-python/trunk/${version}/+download/libasyncns-python-${version}.tar.bz2"; 17 sha256 = "1q4l71b2h9q756x4pjynp6kczr2d8c1jvbdp982hf7xzv7w5gxqg"; 18 }; 19 20 patches = [ ./libasyncns-fix-res-consts.patch ]; 21 22 postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' 23 substituteInPlace resquery.c \ 24 --replace '<arpa/nameser.h>' '<arpa/nameser_compat.h>' 25 ''; 26 27 buildInputs = [ libasyncns ]; 28 nativeBuildInputs = [ pkg-config ]; 29 doCheck = false; # requires network access 30 31 pythonImportsCheck = [ "libasyncns" ]; 32 33 meta = with lib; { 34 description = "Libasyncns-python is a python binding for the asynchronous name service query library"; 35 license = licenses.lgpl21; 36 maintainers = [ maintainers.mic92 ]; 37 homepage = "https://launchpad.net/libasyncns-python"; 38 }; 39}