nixpkgs/pkgs/development/libraries/libasyncns/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
863 B
Nix
Raw Normal View History

{ 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>'
'';
configureFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"ac_cv_func_malloc_0_nonnull=yes"
"ac_cv_func_realloc_0_nonnull=yes"
];
meta = with lib; {
homepage = "http://0pointer.de/lennart/projects/libasyncns/";
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;
};
}