diff --git a/pkgs/servers/dns/nsd/default.nix b/pkgs/servers/dns/nsd/default.nix new file mode 100644 index 000000000000..7279aa6d4ef8 --- /dev/null +++ b/pkgs/servers/dns/nsd/default.nix @@ -0,0 +1,34 @@ +{ config, stdenv, fetchurl, libevent, openssl +}: + +stdenv.mkDerivation rec { + name = "nsd-4.0.3"; + + src = fetchurl { + url = "http://www.nlnetlabs.nl/downloads/nsd/${name}.tar.gz"; + sha256 = "4bf05f2234e1b41899198aa1070f409201fc3c4980feef6567cd92c7074c4a8b"; + }; + + buildInputs = [ libevent openssl ]; + + configureFlags = + let flag = state: flags: if state then map (x: "--enable-${x}") flags + else map (x: "--disable-${x}") flags; + in flag (config.nsd.bind8Stats or false) [ "bind8-stats" ] + ++ flag (config.nsd.checking or false) [ "checking" ] + ++ flag (config.nsd.ipv6 or true) [ "ipv6" ] + ++ flag (config.nsd.mmap or false) [ "mmap" ] + ++ flag (config.nsd.minimalResponses or true) [ "minimal-responses" ] + ++ flag (config.nsd.nsec3 or true) [ "nsec3" ] + ++ flag (config.nsd.ratelimit or false) [ "ratelimit" ] + ++ flag (config.nsd.recvmmsg or false) [ "recvmmsg" ] + ++ flag (config.nsd.rootServer or false) [ "root-server" ] + ++ [ "--with-ssl=${openssl}" "--with-libevent=${libevent}" ]; + + meta = { + description = "Authoritative only, high performance, simple and open source name server."; + license = "BSD"; + homepage = http://www.nlnetlabs.nl; + platforms = with stdenv.lib.platforms; linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 14a6cde1bf7d..0adca2cd1b3e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6679,6 +6679,8 @@ let ngircd = callPackage ../servers/irc/ngircd { }; + nsd = callPackage ../servers/dns/nsd { }; + opensmtpd = callPackage ../servers/mail/opensmtpd { }; petidomo = callPackage ../servers/mail/petidomo { };