2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchurl }:
|
2015-04-25 22:08:26 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-06-22 13:21:29 +00:00
|
|
|
pname = "libasyncns";
|
|
|
|
version = "0.8";
|
2015-04-25 22:08:26 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-06-22 13:21:29 +00:00
|
|
|
url = "http://0pointer.de/lennart/projects/libasyncns/${pname}-${version}.tar.gz";
|
2015-04-25 22:08:26 +00:00
|
|
|
sha256 = "0x5b6lcic4cd7q0bx00x93kvpyzl7n2abbgvqbrlzrfb8vknc6jg";
|
|
|
|
};
|
|
|
|
|
2021-11-20 23:39:09 +00:00
|
|
|
postPatch = lib.optionalString stdenv.isDarwin ''
|
|
|
|
substituteInPlace libasyncns/asyncns.c \
|
|
|
|
--replace '<arpa/nameser.h>' '<arpa/nameser_compat.h>'
|
|
|
|
'';
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
configureFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
2020-03-07 22:14:15 +00:00
|
|
|
"ac_cv_func_malloc_0_nonnull=yes"
|
|
|
|
"ac_cv_func_realloc_0_nonnull=yes"
|
|
|
|
];
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://0pointer.de/lennart/projects/libasyncns/";
|
2016-06-20 10:53:46 +00:00
|
|
|
description = "A C library for Linux/Unix for executing name service queries asynchronously";
|
2015-04-25 22:08:26 +00:00
|
|
|
license = licenses.lgpl21;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|