From 15f425ae9c25aacea6dfd3754e9a0f7e803524ac Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sat, 20 Nov 2021 23:39:53 +0000 Subject: [PATCH] python3Packages.libasyncns: fix build for darwin --- .../python-modules/libasyncns/default.nix | 14 ++++++++++++-- 1 file 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 '' '' + ''; + buildInputs = [ libasyncns ]; nativeBuildInputs = [ pkg-config ]; doCheck = false; # requires network access