Merge pull request #146822 from risicle/ris-libasyncns-darwin-fix

libasyncns: fix build for darwin

authored by Dmitry Kalinkin and committed by GitHub 296032dd 67a50ee7

+19 -2
+5
pkgs/development/libraries/libasyncns/default.nix
··· 9 9 sha256 = "0x5b6lcic4cd7q0bx00x93kvpyzl7n2abbgvqbrlzrfb8vknc6jg"; 10 10 }; 11 11 12 + postPatch = lib.optionalString stdenv.isDarwin '' 13 + substituteInPlace libasyncns/asyncns.c \ 14 + --replace '<arpa/nameser.h>' '<arpa/nameser_compat.h>' 15 + ''; 16 + 12 17 configureFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ 13 18 "ac_cv_func_malloc_0_nonnull=yes" 14 19 "ac_cv_func_realloc_0_nonnull=yes"
+14 -2
pkgs/development/python-modules/libasyncns/default.nix
··· 1 - { lib, buildPythonPackage, fetchurl 2 - , libasyncns, pkg-config }: 1 + { lib 2 + , stdenv 3 + , buildPythonPackage 4 + , fetchurl 5 + , libasyncns 6 + , pkg-config 7 + }: 3 8 4 9 buildPythonPackage rec { 5 10 pname = "libasyncns-python"; ··· 12 17 13 18 patches = [ ./libasyncns-fix-res-consts.patch ]; 14 19 20 + postPatch = lib.optionalString stdenv.isDarwin '' 21 + substituteInPlace resquery.c \ 22 + --replace '<arpa/nameser.h>' '<arpa/nameser_compat.h>' 23 + ''; 24 + 15 25 buildInputs = [ libasyncns ]; 16 26 nativeBuildInputs = [ pkg-config ]; 17 27 doCheck = false; # requires network access 28 + 29 + pythonImportsCheck = [ "libasyncns" ]; 18 30 19 31 meta = with lib; { 20 32 description = "libasyncns-python is a python binding for the asynchronous name service query library";