@@ -1,37 +1,7 @@
1−{ stdenv, fetchurl, libtool, docbook5_xsl
1+{ stdenv, fetchurl, openssl, libtool, perl, libxml2 }:
22
3−# Optional Dependencies
4−, libseccomp ? null, python ? null, kerberos ? null, openssl ? null
5−, libxml2 ? null, json_c ? null, readline ? null, libcap ? null, idnkit ? null
6−, libiconv ? null
3+let version = "9.10.2"; in
74
8−# Optional DLZ Modules
9−, postgresql ? null, libmysql ? null, db ? null, openldap ? null
10−}:
11−
12−assert postgresql != null;
13−with stdenv;
14−let
15− version = "9.10.2";
16−
17− optLibseccomp = shouldUsePkg libseccomp;
18− optPython = shouldUsePkg python;
19− optKerberos = shouldUsePkg kerberos;
20− optOpenssl = shouldUsePkg openssl;
21− optLibxml2 = shouldUsePkg libxml2;
22− optJson_c = shouldUsePkg json_c;
23− optReadline = shouldUsePkg readline;
24− optLibcap = if !stdenv.isLinux then null else shouldUsePkg libcap;
25− optIdnkit = shouldUsePkg idnkit;
26− optLibiconv = shouldUsePkg libiconv;
27−
28− optPostgresql = shouldUsePkg postgresql;
29− optLibmysql = shouldUsePkg libmysql;
30− optDb = shouldUsePkg db;
31− optOpenldap = shouldUsePkg openldap;
32−in
33−assert optPostgresql != null;
34−with stdenv.lib;
355stdenv.mkDerivation rec {
366 name = "bind-${version}";
377
@@ -44,78 +14,30 @@ stdenv.mkDerivation rec {
4414 sed -i 's/^\t.*run/\t/' Makefile.in
4515 '';
4616
47− nativeBuildInputs = [ optPython libtool docbook5_xsl ];
48− buildInputs = [
49− optLibseccomp optPython optKerberos optOpenssl optLibxml2 optJson_c
50− optReadline optLibcap optIdnkit optLibiconv optPostgresql optLibmysql
51− optDb optOpenldap
52− ];
17+ buildInputs = [ openssl libtool perl libxml2 ];
5318
5419 configureFlags = [
55− (mkOther "localstatedir" "/var")
56− (mkOther "sysconfdir" "/etc")
57− (mkEnable (optLibseccomp != null) "seccomp" null)
58− (mkWith (optPython != null) "python" "${optPython}/bin/python")
59− (mkEnable true "kqueue" null)
60− (mkEnable true "epoll" null)
61− (mkEnable true "devpoll" null)
62− (mkWith false "geoip" null) # TODO(wkennington): GeoDNS support
63− (mkWith (optKerberos != null) "gssapi" optKerberos)
64− (mkWith true "libtool" null)
65− (mkEnable (optOpenssl == null) "native-pkcs11" null)
66− (mkWith (optOpenssl != null) "openssl" optOpenssl)
67− (mkWith true "pkcs11" null)
68− (mkWith true "ecdsa" null)
69− (mkWith false "gost" null) # Insecure cipher
70− (mkWith true "aes" null)
71− (mkEnable (optOpenssl != null) "openssl-hash" null)
72− (mkEnable true "sit" null)
73− (mkWith true "sit-alg" "aes")
74− (mkWith (optLibxml2 != null) "libxml2" optLibxml2)
75− (mkWith (optJson_c != null) "libjson" optJson_c)
76− (mkEnable true "largefile" null)
77− (mkWith false "purify" null)
78− (mkWith false "gperftools-profiler" null)
79− (mkEnable false "backtrace" null)
80− (mkEnable false "symtable" null)
81− (mkEnable true "ipv6" null)
82− (mkWith false "kame" null)
83− (mkWith (optReadline != null) "readline" null)
84− (mkEnable (optKerberos == null) "isc-spnego" null)
85− (mkEnable true "chroot" null)
86− (mkEnable (optLibcap != null) "linux-caps" null)
87− (mkEnable true "atomic" null)
88− (mkEnable false "fixed-rrset" null)
89− (mkEnable true "rpz-nsip" null)
90− (mkEnable true "rpz-nsdname" null)
91− (mkEnable true "filter-aaaa" null)
92− (mkWith true "docbook-xsl" "${docbook5_xsl}/share/xsl/docbook")
93− (mkWith (optIdnkit != null) "idn" optIdnkit)
94− (mkWith (optLibiconv != null) "libiconv" optLibiconv)
95− (mkWith false "atf" null)
96− (mkWith true "tuning" "large")
97− (mkWith true "dlopen" null)
98− (mkWith false "make-clean" null)
99− (mkEnable true "full-report" null)
100− (mkWith (optPostgresql != null) "dlz-postgres" optPostgresql)
101− (mkWith (optLibmysql != null) "dlz-mysql" optLibmysql)
102− (mkWith (optDb != null) "dlz-bdb" optDb)
103− (mkWith true "dlz-filesystem" null)
104− (mkWith (optOpenldap != null) "dlz-ldap" optOpenldap)
105− (mkWith false "dlz-odbc" null)
106− (mkWith true "dlz-stub" null)
107− ];
108−
109− installFlags = [
110− "sysconfdir=\${out}/etc"
111− "localstatedir=\${TMPDIR}"
20+ "--localstatedir=/var"
21+ "--with-libtool"
22+ "--with-libxml2=${libxml2}"
23+ "--with-openssl=${openssl}"
24+ "--without-atf"
25+ "--without-dlopen"
26+ "--without-docbook-xsl"
27+ "--without-gssapi"
28+ "--without-idn"
29+ "--without-idnlib"
30+ "--without-pkcs11"
31+ "--without-purify"
32+ "--without-python"
11233 ];
11334
11435 meta = {
11536 homepage = "http://www.isc.org/software/bind";
11637 description = "Domain name server";
117− license = licenses.isc;
118− maintainers = with maintainers; [ viric simons wkennington ];
119− platforms = platforms.unix;
38+ license = stdenv.lib.licenses.isc;
39+
40+ maintainers = with stdenv.lib.maintainers; [viric simons];
41+ platforms = with stdenv.lib.platforms; unix;
12042 };
12143}