base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / li / libasyncns / package.nix
blob77c998f4216b7b68ea8ea3ce26fed6155a6c0147
1 { lib, stdenv, fetchurl }:
3 stdenv.mkDerivation rec {
4   pname = "libasyncns";
5   version = "0.8";
7   src = fetchurl {
8     url = "http://0pointer.de/lennart/projects/libasyncns/${pname}-${version}.tar.gz";
9     sha256 = "0x5b6lcic4cd7q0bx00x93kvpyzl7n2abbgvqbrlzrfb8vknc6jg";
10   };
12   postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
13     substituteInPlace libasyncns/asyncns.c \
14       --replace '<arpa/nameser.h>' '<arpa/nameser_compat.h>'
15   '';
17   configureFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
18     "ac_cv_func_malloc_0_nonnull=yes"
19     "ac_cv_func_realloc_0_nonnull=yes"
20   ];
22   meta = with lib; {
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;
27   };