From 3b47da676562d6487ad28d957bcbad7bdccc8f5c Mon Sep 17 00:00:00 2001 From: toonn Date: Thu, 21 Mar 2024 13:48:03 +0100 Subject: [PATCH] nssmdns: Fix configuration location Nssmdns reads the `mdns.allow` configuration file if it is present. By default it expects the file at `${sysconfdir}/mdns.allow`, sysconfdir defaults to `${prefix}/etc` and ends up being a path inside the package's directory in the store. This makes it impossible to configure nssmdns through this file. The `bootstrap.sh` script included in the sources passes the same `--sysconfdir=/etc` as suggested here. Maybe we should run the script instead? It runs autoreconf so we might be able to drop the autoreconfHook. An alternative would be to set `MDNS_ALLOW_FILE`, but sysconfdir is only used for this file so I suggest leaving this as a simple way for users of the package to override the location of the file. Co-authored-by: flokli --- pkgs/tools/networking/nss-mdns/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/tools/networking/nss-mdns/default.nix b/pkgs/tools/networking/nss-mdns/default.nix index f0c47fe945e1..5b6c90e63bdf 100644 --- a/pkgs/tools/networking/nss-mdns/default.nix +++ b/pkgs/tools/networking/nss-mdns/default.nix @@ -22,6 +22,8 @@ stdenv.mkDerivation rec { "--enable-avahi" # Connect to the daemon at `/var/run/avahi-daemon/socket'. "--localstatedir=/var" + # Read configuration at `/etc/mdns.allow`, not `$out/etc/mdns.allow`. + "--sysconfdir=/etc" ]; meta = {