@@ -10,6 +10,8 @@
1010, rootServer ? false
1111, rrtypes ? false
1212, zoneStats ? false
13+
14+, configFile ? "etc/nsd/nsd.conf"
1315}:
1416
1517stdenv.mkDerivation rec {
@@ -39,7 +41,15 @@ stdenv.mkDerivation rec {
3941 ++ edf rootServer "root-server"
4042 ++ edf rrtypes "draft-rrtypes"
4143 ++ edf zoneStats "zone-stats"
42− ++ [ "--with-ssl=${openssl.dev}" "--with-libevent=${libevent.dev}" ];
44+ ++ [ "--with-ssl=${openssl.dev}"
45+ "--with-libevent=${libevent.dev}"
46+ "--with-nsd_conf_file=${configFile}"
47+ "--with-configdir=etc/nsd"
48+ ];
49+
50+ patchPhase = ''
51+ sed 's@$(INSTALL_DATA) nsd.conf.sample $(DESTDIR)$(nsdconfigfile).sample@@g' -i Makefile.in
52+ '';
4353
4454 meta = with stdenv.lib; {
4555 homepage = http://www.nlnetlabs.nl;