1 { lib, stdenv, fetchurl, libevent, openssl, nixosTests
6 , minimalResponses ? true
14 , configFile ? "/etc/nsd/nsd.conf"
17 stdenv.mkDerivation rec {
22 url = "https://www.nlnetlabs.nl/downloads/${pname}/${pname}-${version}.tar.gz";
23 sha256 = "sha256-gg2k44RyGRX0vK9/K+2YUZ2lY8bkwTDHQsckdg7AKgo=";
27 substituteInPlace nsd-control-setup.sh.in --replace openssl ${openssl}/bin/openssl
30 buildInputs = [ libevent openssl ];
32 enableParallelBuilding = true;
35 let edf = c: o: if c then ["--enable-${o}"] else ["--disable-${o}"];
36 in edf bind8Stats "bind8-stats"
37 ++ edf checking "checking"
40 ++ edf minimalResponses "minimal-responses"
42 ++ edf ratelimit "ratelimit"
43 ++ edf recvmmsg "recvmmsg"
44 ++ edf rootServer "root-server"
45 ++ edf rrtypes "draft-rrtypes"
46 ++ edf zoneStats "zone-stats"
47 ++ [ "--with-ssl=${openssl.dev}"
48 "--with-libevent=${libevent.dev}"
49 "--with-nsd_conf_file=${configFile}"
50 "--with-configdir=etc/nsd"
54 sed 's@$(INSTALL_DATA) nsd.conf.sample $(DESTDIR)$(nsdconfigfile).sample@@g' -i Makefile.in
58 inherit (nixosTests) nsd;
62 homepage = "http://www.nlnetlabs.nl";
63 description = "Authoritative only, high performance, simple and open source name server";
64 license = licenses.bsd3;
65 platforms = platforms.unix;
66 maintainers = [ maintainers.hrdinka ];