@@ -7,19 +7,15 @@
8# Optional DLZ Modules
8# Optional DLZ Modules
9, postgresql ? null, libmysql ? null, db ? null, openldap ? null
9, postgresql ? null, libmysql ? null, db ? null, openldap ? null
12+assert postgresql != null;
15with stdenv;
13with stdenv;
17 version = "9.10.2";
15 version = "9.10.2";
19− toolsOnly = suffix == "tools";
21 optLibseccomp = shouldUsePkg libseccomp;
17 optLibseccomp = shouldUsePkg libseccomp;
22− optPython = if toolsOnly then null else shouldUsePkg python;
18+ optPython = shouldUsePkg python;
23 optKerberos = shouldUsePkg kerberos;
19 optKerberos = shouldUsePkg kerberos;
24 optOpenssl = shouldUsePkg openssl;
20 optOpenssl = shouldUsePkg openssl;
25 optLibxml2 = shouldUsePkg libxml2;
21 optLibxml2 = shouldUsePkg libxml2;
@@ -29,19 +25,18 @@ let
29 optIdnkit = shouldUsePkg idnkit;
25 optIdnkit = shouldUsePkg idnkit;
30 optLibiconv = shouldUsePkg libiconv;
26 optLibiconv = shouldUsePkg libiconv;
32− optPostgresql = if toolsOnly then null else shouldUsePkg postgresql;
28+ optPostgresql = shouldUsePkg postgresql;
33− optLibmysql = if toolsOnly then null else shouldUsePkg libmysql;
29+ optLibmysql = shouldUsePkg libmysql;
34− optDb = if toolsOnly then null else shouldUsePkg db;
30+ optDb = shouldUsePkg db;
35− optOpenldap = if toolsOnly then null else shouldUsePkg openldap;
31+ optOpenldap = shouldUsePkg openldap;
37− pythonBin = if optPython == null then null else "${optPython}/bin/python";
33+assert optPostgresql != null;
39with stdenv.lib;
34with stdenv.lib;
40stdenv.mkDerivation rec {
35stdenv.mkDerivation rec {
41− name = "bind${optionalString (suffix != "") "-${suffix}"}-${version}";
36+ name = "bind-${version}";
43 src = fetchurl {
38 src = fetchurl {
44− url = "http://ftp.isc.org/isc/bind9/${version}/bind-${version}.tar.gz";
39+ url = "http://ftp.isc.org/isc/bind9/${version}/${name}.tar.gz";
45 sha256 = "163s8pvqj4lyryvfzkc6acbys7gw1by5dqwilggiwp54ia8bg6vg";
40 sha256 = "163s8pvqj4lyryvfzkc6acbys7gw1by5dqwilggiwp54ia8bg6vg";
@@ -60,7 +55,7 @@ stdenv.mkDerivation rec {
60 (mkOther "localstatedir" "/var")
55 (mkOther "localstatedir" "/var")
61 (mkOther "sysconfdir" "/etc")
56 (mkOther "sysconfdir" "/etc")
62 (mkEnable (optLibseccomp != null) "seccomp" null)
57 (mkEnable (optLibseccomp != null) "seccomp" null)
63− (mkWith (optPython != null) "python" pythonBin)
58+ (mkWith (optPython != null) "python" "${optPython}/bin/python")
64 (mkEnable true "kqueue" null)
59 (mkEnable true "kqueue" null)
65 (mkEnable true "epoll" null)
60 (mkEnable true "epoll" null)
66 (mkEnable true "devpoll" null)
61 (mkEnable true "devpoll" null)
@@ -114,18 +109,8 @@ stdenv.mkDerivation rec {
114 installFlags = [
109 installFlags = [
115 "sysconfdir=\${out}/etc"
110 "sysconfdir=\${out}/etc"
116 "localstatedir=\${TMPDIR}"
111 "localstatedir=\${TMPDIR}"
117− ] ++ optionals toolsOnly [
118− "DESTDIR=\${TMPDIR}"
121− postInstall = optionalString toolsOnly ''
122− mkdir -p $out/{bin,etc,lib,share/man/man1}
123− install -m 0755 $TMPDIR/$out/bin/{dig,nslookup,nsupdate} $out/bin
124− install -m 0644 $TMPDIR/$out/etc/bind.keys $out/etc
125− install -m 0644 $TMPDIR/$out/lib/*.so.* $out/lib
126− install -m 0644 $TMPDIR/$out/share/man/man1/{dig,nslookup,nsupdate}.1 $out/share/man/man1
129 enableParallelBuilding = true;
114 enableParallelBuilding = true;