diff --git a/pkgs/tools/networking/dnstracer/default.nix b/pkgs/tools/networking/dnstracer/default.nix index bb7c688480f0..6d5e826c7d75 100644 --- a/pkgs/tools/networking/dnstracer/default.nix +++ b/pkgs/tools/networking/dnstracer/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl }: +{ stdenv, fetchurl, libresolv }: stdenv.mkDerivation rec { version = "1.9"; @@ -13,6 +13,10 @@ stdenv.mkDerivation rec { setOutputFlags = false; + buildInputs = [] ++ stdenv.lib.optionals stdenv.isDarwin [ libresolv ]; + + NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lresolv"; + meta = with stdenv.lib; { description = "Dnstracer determines where a given Domain Name Server (DNS) gets its information from, and follows the chain of DNS servers back to the servers which know the data."; homepage = http://www.mavetju.org/unix/general.php; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b89e59463bd8..8579cd4a872b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19794,5 +19794,7 @@ with pkgs; duti = callPackage ../os-specific/darwin/duti {}; - dnstracer = callPackage ../tools/networking/dnstracer {}; + dnstracer = callPackage ../tools/networking/dnstracer { + inherit (darwin) libresolv; + }; }