Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchurl, 5}: 6 7stdenv.mkDerivation rec { 8 pname = "libasyncns"; 9 version = "0.8"; 10 11 src = fetchurl { 12 url = "http://0pointer.de/lennart/projects/libasyncns/${pname}-${version}.tar.gz"; 13 sha256 = "0x5b6lcic4cd7q0bx00x93kvpyzl7n2abbgvqbrlzrfb8vknc6jg"; 14 }; 15 16 postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' 17 substituteInPlace libasyncns/asyncns.c \ 18 --replace '<arpa/nameser.h>' '<arpa/nameser_compat.h>' 19 ''; 20 21 configureFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ 22 "ac_cv_func_malloc_0_nonnull=yes" 23 "ac_cv_func_realloc_0_nonnull=yes" 24 ]; 25 26 meta = with lib; { 27 homepage = "http://0pointer.de/lennart/projects/libasyncns/"; 28 description = "C library for Linux/Unix for executing name service queries asynchronously"; 29 license = licenses.lgpl21; 30 platforms = platforms.unix; 31 }; 32}