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