Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / libasyncns / default.nix
blobbd28c2207340cac6310416405211668f28f5de47
1 { lib
2 , stdenv
3 , buildPythonPackage
4 , fetchurl
5 , libasyncns
6 , pkg-config
7 }:
9 buildPythonPackage rec {
10   pname = "libasyncns-python";
11   version = "0.7.1";
13   src = fetchurl {
14     url = "https://launchpad.net/libasyncns-python/trunk/${version}/+download/libasyncns-python-${version}.tar.bz2";
15     sha256 = "1q4l71b2h9q756x4pjynp6kczr2d8c1jvbdp982hf7xzv7w5gxqg";
16   };
18   patches = [ ./libasyncns-fix-res-consts.patch ];
20   postPatch = lib.optionalString stdenv.isDarwin ''
21     substituteInPlace resquery.c \
22       --replace '<arpa/nameser.h>' '<arpa/nameser_compat.h>'
23   '';
25   buildInputs = [ libasyncns ];
26   nativeBuildInputs = [ pkg-config ];
27   doCheck = false; # requires network access
29   pythonImportsCheck = [ "libasyncns" ];
31   meta = with lib; {
32     description = "libasyncns-python is a python binding for the asynchronous name service query library";
33     license = licenses.lgpl21;
34     maintainers = [ maintainers.mic92 ];
35     homepage = "https://launchpad.net/libasyncns-python";
36   };