2016-10-16 21:37:48 +01:00
|
|
|
{ stdenv, lib, fetchurl, openssl, libtool, perl, libxml2
|
2017-05-09 17:10:06 +01:00
|
|
|
, enableSeccomp ? false, libseccomp ? null }:
|
|
|
|
|
|
|
|
assert enableSeccomp -> libseccomp != null;
|
2011-01-07 11:33:04 +00:00
|
|
|
|
2017-08-01 09:00:09 +01:00
|
|
|
let version = "9.11.2"; in
|
2012-10-02 16:48:54 +01:00
|
|
|
|
2011-01-07 11:33:04 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2015-06-01 20:35:41 +01:00
|
|
|
name = "bind-${version}";
|
2011-01-07 11:33:04 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-06-01 20:35:41 +01:00
|
|
|
url = "http://ftp.isc.org/isc/bind9/${version}/${name}.tar.gz";
|
2017-08-01 09:00:09 +01:00
|
|
|
sha256 = "0yn7wgi2y8mpmvbjbkl4va7p0xsnn48m4yjx6ynb1hzp423asikz";
|
2011-01-07 11:33:04 +00:00
|
|
|
};
|
|
|
|
|
2017-01-05 18:58:26 +00:00
|
|
|
outputs = [ "out" "lib" "dev" "man" "dnsutils" "host" ];
|
2015-10-30 21:12:29 +00:00
|
|
|
|
|
|
|
patches = [ ./dont-keep-configure-flags.patch ./remove-mkdir-var.patch ] ++
|
2016-05-12 23:29:30 +01:00
|
|
|
stdenv.lib.optional stdenv.isDarwin ./darwin-openssl-linking-fix.patch;
|
2015-11-28 18:26:59 +00:00
|
|
|
|
2016-09-28 02:37:36 +01:00
|
|
|
buildInputs = [ openssl libtool perl libxml2 ] ++
|
2017-05-09 17:10:06 +01:00
|
|
|
stdenv.lib.optional enableSeccomp libseccomp;
|
2011-01-07 11:33:04 +00:00
|
|
|
|
2017-02-19 11:11:52 +00:00
|
|
|
STD_CDEFINES = [ "-DDIG_SIGCHASE=1" ]; # support +sigchase
|
|
|
|
|
2013-06-09 18:25:46 +01:00
|
|
|
configureFlags = [
|
2015-06-01 20:35:51 +01:00
|
|
|
"--localstatedir=/var"
|
|
|
|
"--with-libtool"
|
2016-08-30 00:57:21 +01:00
|
|
|
"--with-libxml2=${libxml2.dev}"
|
2016-04-16 18:44:32 +01:00
|
|
|
"--with-openssl=${openssl.dev}"
|
2015-06-01 20:35:51 +01:00
|
|
|
"--without-atf"
|
|
|
|
"--without-dlopen"
|
|
|
|
"--without-docbook-xsl"
|
|
|
|
"--without-gssapi"
|
|
|
|
"--without-idn"
|
|
|
|
"--without-idnlib"
|
|
|
|
"--without-pkcs11"
|
|
|
|
"--without-purify"
|
|
|
|
"--without-python"
|
2017-05-09 17:10:06 +01:00
|
|
|
] ++ lib.optional enableSeccomp "--enable-seccomp";
|
2012-10-02 16:48:54 +01:00
|
|
|
|
2015-10-30 21:12:29 +00:00
|
|
|
postInstall = ''
|
|
|
|
moveToOutput bin/bind9-config $dev
|
|
|
|
moveToOutput bin/isc-config.sh $dev
|
2016-05-18 21:05:51 +01:00
|
|
|
|
2016-10-08 15:01:15 +01:00
|
|
|
moveToOutput bin/host $host
|
|
|
|
|
|
|
|
moveToOutput bin/dig $dnsutils
|
|
|
|
moveToOutput bin/nslookup $dnsutils
|
|
|
|
moveToOutput bin/nsupdate $dnsutils
|
|
|
|
|
2016-12-08 17:50:07 +00:00
|
|
|
for f in "$lib/lib/"*.la "$dev/bin/"{isc-config.sh,bind*-config}; do
|
|
|
|
sed -i "$f" -e 's|-L${openssl.dev}|-L${openssl.out}|g'
|
2016-05-18 21:05:51 +01:00
|
|
|
done
|
2015-10-30 21:12:29 +00:00
|
|
|
'';
|
|
|
|
|
2011-01-07 11:33:04 +00:00
|
|
|
meta = {
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = http://www.isc.org/software/bind;
|
2014-08-24 15:21:08 +01:00
|
|
|
description = "Domain name server";
|
2015-06-01 20:35:51 +01:00
|
|
|
license = stdenv.lib.licenses.isc;
|
|
|
|
|
2016-05-16 21:30:20 +01:00
|
|
|
maintainers = with stdenv.lib.maintainers; [viric peti];
|
2015-06-01 20:35:51 +01:00
|
|
|
platforms = with stdenv.lib.platforms; unix;
|
2017-01-05 18:58:26 +00:00
|
|
|
|
|
|
|
outputsToInstall = [ "out" "dnsutils" "host" ];
|
2011-01-07 11:33:04 +00:00
|
|
|
};
|
|
|
|
}
|