bind: split out dnsutils & host binaries (#18903)

These tools are commonly used but don't require the other bind binaries.
Bind's libs are used, so they've also been split into an extra output.

The old version of host isn't maintained anymore and was removed From Debian
back in 2009: https://packages.qa.debian.org/h/host.html
This commit is contained in:
Franz Pletz 2016-10-08 16:01:15 +02:00 committed by GitHub
parent 2763d4d4c7
commit fa405aa264
3 changed files with 12 additions and 28 deletions

View file

@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
sha256 = "1vxs29w4hnl7jcd7sknga58xv1qk2rcpsxyich7cpp7xi77faxd0";
};
outputs = [ "bin" "dev" "out" "man" ];
outputs = [ "bin" "lib" "dev" "out" "man" "dnsutils" "host" ];
patches = [ ./dont-keep-configure-flags.patch ./remove-mkdir-var.patch ] ++
stdenv.lib.optional stdenv.isDarwin ./darwin-openssl-linking-fix.patch;
@ -40,6 +40,15 @@ stdenv.mkDerivation rec {
moveToOutput bin/bind9-config $dev
moveToOutput bin/isc-config.sh $dev
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
for f in "$out/lib/"*.la; do
sed -i $f -e 's|-L${openssl.dev}|-L${openssl.out}|g'
done

View file

@ -1,26 +0,0 @@
{ fetchurl, stdenv }:
let version = "20000331"; in
stdenv.mkDerivation {
name = "host-${version}";
src = fetchurl {
url = "mirror://debian/pool/main/h/host/host_${version}.orig.tar.gz";
sha256 = "1g352k80arhwyidsa95nk28xjvzyypmwv3kga2451m3g7fmdqki1";
};
preConfigure = ''
makeFlagsArray=(DESTBIN=$out/bin DESTMAN=$out/share/man OWNER=$(id -u) GROUP=$(id -g))
mkdir -p "$out/bin"
mkdir -p "$out/share/man/man1"
'';
installTargets = "install man";
meta = {
description = "DNS resolution utility";
license = "BSD-style";
platforms = stdenv.lib.platforms.linux;
};
}

View file

@ -2081,7 +2081,7 @@ in
horst = callPackage ../tools/networking/horst { };
host = callPackage ../tools/networking/host { };
host = bind.host;
hping = callPackage ../tools/networking/hping { };
@ -9817,6 +9817,7 @@ in
sabnzbd = callPackage ../servers/sabnzbd { };
bind = callPackage ../servers/dns/bind { };
dnsutils = bind.dnsutils;
bird = callPackage ../servers/bird { };
bird6 = bird.override { enableIPv6 = true; };