1 { lib, stdenv, fetchurl, writeTextDir
2 , withCMake ? true, cmake
4 # sensitive downstream packages
6 , grpc # consumes cmake config
9 # Note: this package is used for bootstrapping fetchurl, and thus
10 # cannot use fetchpatch! All mutable patches (generated by GitHub or
11 # cgit) that are needed here should be included directly in Nixpkgs as
14 stdenv.mkDerivation rec {
19 url = "https://c-ares.haxx.se/download/${pname}-${version}.tar.gz";
20 sha256 = "sha256-MhcAOZty7Q4DfQB0xinndB9rLsLdqSlWq+PpZx0+Jo4=";
23 outputs = [ "out" "dev" "man" ];
25 nativeBuildInputs = lib.optionals withCMake [ cmake ];
27 cmakeFlags = [] ++ lib.optionals stdenv.hostPlatform.isStatic [
32 enableParallelBuilding = true;
36 curl = (curl.override { c-aresSupport = true; }).tests.withCheck;
40 description = "A C library for asynchronous DNS requests";
41 homepage = "https://c-ares.haxx.se";
42 changelog = "https://c-ares.org/changelog.html#${lib.replaceStrings [ "." ] [ "_" ] version}";
43 license = licenses.mit;
44 platforms = platforms.all;