From e6708cea37b86b59cc5b35e434b4711bdbbe5064 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Thu, 5 Jan 2017 19:58:26 +0100 Subject: [PATCH] bind: fix collision of binaries in outputs Using outputsToInstall the intended behaviour of including host and dnsutils when bind is installed can be implemented instead of using symlinks to fix installing all outputs individually with nix-env. Fixes #19761. --- nixos/modules/services/networking/bind.nix | 2 +- pkgs/servers/dns/bind/default.nix | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/nixos/modules/services/networking/bind.nix b/nixos/modules/services/networking/bind.nix index 72110e625766..0272b6ceff20 100644 --- a/nixos/modules/services/networking/bind.nix +++ b/nixos/modules/services/networking/bind.nix @@ -155,7 +155,7 @@ in chown ${bindUser} /var/run/named ''; - script = "${pkgs.bind.bin}/sbin/named -u ${bindUser} ${optionalString cfg.ipv4Only "-4"} -c ${cfg.configFile} -f"; + script = "${pkgs.bind.out}/sbin/named -u ${bindUser} ${optionalString cfg.ipv4Only "-4"} -c ${cfg.configFile} -f"; unitConfig.Documentation = "man:named(8)"; }; }; diff --git a/pkgs/servers/dns/bind/default.nix b/pkgs/servers/dns/bind/default.nix index e3f2364463ba..d3daad1e0cbc 100644 --- a/pkgs/servers/dns/bind/default.nix +++ b/pkgs/servers/dns/bind/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "11lxkb7d79c75scrs28q4xmr0ii2li69zj1c650al3qxir8yf754"; }; - outputs = [ "bin" "lib" "dev" "out" "man" "dnsutils" "host" ]; + outputs = [ "out" "lib" "dev" "man" "dnsutils" "host" ]; patches = [ ./dont-keep-configure-flags.patch ./remove-mkdir-var.patch ] ++ stdenv.lib.optional stdenv.isDarwin ./darwin-openssl-linking-fix.patch; @@ -40,13 +40,10 @@ stdenv.mkDerivation rec { 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 "$lib/lib/"*.la "$dev/bin/"{isc-config.sh,bind*-config}; do sed -i "$f" -e 's|-L${openssl.dev}|-L${openssl.out}|g' @@ -60,5 +57,7 @@ stdenv.mkDerivation rec { maintainers = with stdenv.lib.maintainers; [viric peti]; platforms = with stdenv.lib.platforms; unix; + + outputsToInstall = [ "out" "dnsutils" "host" ]; }; }