mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-14 11:20:12 +00:00
33 lines
903 B
Nix
33 lines
903 B
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchurl,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "libasyncns";
|
|
version = "0.8";
|
|
|
|
src = fetchurl {
|
|
url = "https://0pointer.de/lennart/projects/libasyncns/libasyncns-${finalAttrs.version}.tar.gz";
|
|
sha256 = "0x5b6lcic4cd7q0bx00x93kvpyzl7n2abbgvqbrlzrfb8vknc6jg";
|
|
};
|
|
|
|
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
|
substituteInPlace libasyncns/asyncns.c \
|
|
--replace '<arpa/nameser.h>' '<arpa/nameser_compat.h>'
|
|
'';
|
|
|
|
configureFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
|
"ac_cv_func_malloc_0_nonnull=yes"
|
|
"ac_cv_func_realloc_0_nonnull=yes"
|
|
];
|
|
|
|
meta = {
|
|
homepage = "http://0pointer.de/lennart/projects/libasyncns/";
|
|
description = "C library for Linux/Unix for executing name service queries asynchronously";
|
|
license = lib.licenses.lgpl21;
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
})
|