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