1 { lib, stdenv, fetchurl }:
3 stdenv.mkDerivation rec {
8 url = "http://0pointer.de/lennart/projects/libasyncns/${pname}-${version}.tar.gz";
9 sha256 = "0x5b6lcic4cd7q0bx00x93kvpyzl7n2abbgvqbrlzrfb8vknc6jg";
12 postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
13 substituteInPlace libasyncns/asyncns.c \
14 --replace '<arpa/nameser.h>' '<arpa/nameser_compat.h>'
17 configureFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
18 "ac_cv_func_malloc_0_nonnull=yes"
19 "ac_cv_func_realloc_0_nonnull=yes"
23 homepage = "http://0pointer.de/lennart/projects/libasyncns/";
24 description = "C library for Linux/Unix for executing name service queries asynchronously";
25 license = licenses.lgpl21;
26 platforms = platforms.unix;