mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-29 16:57:40 +03:00
Merge pull request #146822 from risicle/ris-libasyncns-darwin-fix
libasyncns: fix build for darwin
This commit is contained in:
commit
296032dd5f
@ -9,6 +9,11 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "0x5b6lcic4cd7q0bx00x93kvpyzl7n2abbgvqbrlzrfb8vknc6jg";
|
sha256 = "0x5b6lcic4cd7q0bx00x93kvpyzl7n2abbgvqbrlzrfb8vknc6jg";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
postPatch = lib.optionalString stdenv.isDarwin ''
|
||||||
|
substituteInPlace libasyncns/asyncns.c \
|
||||||
|
--replace '<arpa/nameser.h>' '<arpa/nameser_compat.h>'
|
||||||
|
'';
|
||||||
|
|
||||||
configureFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
configureFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||||
"ac_cv_func_malloc_0_nonnull=yes"
|
"ac_cv_func_malloc_0_nonnull=yes"
|
||||||
"ac_cv_func_realloc_0_nonnull=yes"
|
"ac_cv_func_realloc_0_nonnull=yes"
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
{ lib, buildPythonPackage, fetchurl
|
{ lib
|
||||||
, libasyncns, pkg-config }:
|
, stdenv
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchurl
|
||||||
|
, libasyncns
|
||||||
|
, pkg-config
|
||||||
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "libasyncns-python";
|
pname = "libasyncns-python";
|
||||||
@ -12,10 +17,17 @@ buildPythonPackage rec {
|
|||||||
|
|
||||||
patches = [ ./libasyncns-fix-res-consts.patch ];
|
patches = [ ./libasyncns-fix-res-consts.patch ];
|
||||||
|
|
||||||
|
postPatch = lib.optionalString stdenv.isDarwin ''
|
||||||
|
substituteInPlace resquery.c \
|
||||||
|
--replace '<arpa/nameser.h>' '<arpa/nameser_compat.h>'
|
||||||
|
'';
|
||||||
|
|
||||||
buildInputs = [ libasyncns ];
|
buildInputs = [ libasyncns ];
|
||||||
nativeBuildInputs = [ pkg-config ];
|
nativeBuildInputs = [ pkg-config ];
|
||||||
doCheck = false; # requires network access
|
doCheck = false; # requires network access
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "libasyncns" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "libasyncns-python is a python binding for the asynchronous name service query library";
|
description = "libasyncns-python is a python binding for the asynchronous name service query library";
|
||||||
license = licenses.lgpl21;
|
license = licenses.lgpl21;
|
||||||
|
Loading…
Reference in New Issue
Block a user