summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Scott <code@humanleg.org.uk>2021-11-20 23:39:53 +0000
committerRobert Scott <code@humanleg.org.uk>2021-11-20 23:39:53 +0000
commit15f425ae9c25aacea6dfd3754e9a0f7e803524ac (patch)
tree327296fad277d52250f639b2ada0dfa5845bf228
parenta907da6e638c8654bface8a4f5aeec2776668c8c (diff)
python3Packages.libasyncns: fix build for darwin
-rw-r--r--pkgs/development/python-modules/libasyncns/default.nix14
1 files changed, 12 insertions, 2 deletions
diff --git a/pkgs/development/python-modules/libasyncns/default.nix b/pkgs/development/python-modules/libasyncns/default.nix
index 38ca9b26360c..310fc54606c6 100644
--- a/pkgs/development/python-modules/libasyncns/default.nix
+++ b/pkgs/development/python-modules/libasyncns/default.nix
@@ -1,5 +1,10 @@
-{ lib, buildPythonPackage, fetchurl
-, libasyncns, pkg-config }:
+{ lib
+, stdenv
+, buildPythonPackage
+, fetchurl
+, libasyncns
+, pkg-config
+}:
buildPythonPackage rec {
pname = "libasyncns-python";
@@ -12,6 +17,11 @@ buildPythonPackage rec {
patches = [ ./libasyncns-fix-res-consts.patch ];
+ postPatch = lib.optionalString stdenv.isDarwin ''
+ substituteInPlace resquery.c \
+ --replace '<arpa/nameser.h>' '<arpa/nameser_compat.h>'
+ '';
+
buildInputs = [ libasyncns ];
nativeBuildInputs = [ pkg-config ];
doCheck = false; # requires network access