From 3b47da676562d6487ad28d957bcbad7bdccc8f5c Mon Sep 17 00:00:00 2001 From: toonn Date: Thu, 21 Mar 2024 13:48:03 +0100 Subject: [PATCH 1/2] 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 = { From 46d7754bdbb23add9f6ef39378ead567da7ddb1d Mon Sep 17 00:00:00 2001 From: toonn Date: Fri, 22 Mar 2024 12:34:31 +0100 Subject: [PATCH 2/2] nss-mdns: Repository moved to the Avahi organisation The repositories around the Avahi project were moved to the new Avahi organisation on GitHub, news item 2023-12-04 on [the Avahi homepage](https://avahi.org/). [The nss-mdns homepage](https://0pointer.de/lennart/projects/nss-mdns/) seems to be outdated so we point to the repository instead, which at least has an up to date README. Co-authored-by: Sandro --- pkgs/tools/networking/nss-mdns/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/networking/nss-mdns/default.nix b/pkgs/tools/networking/nss-mdns/default.nix index 5b6c90e63bdf..eb231f0ce036 100644 --- a/pkgs/tools/networking/nss-mdns/default.nix +++ b/pkgs/tools/networking/nss-mdns/default.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation rec { version = "0.15.1"; src = fetchFromGitHub { - owner = "lathiat"; + owner = "avahi"; repo = "nss-mdns"; rev = "v${version}"; hash = "sha256-iRaf9/gu9VkGi1VbGpxvC5q+0M8ivezCz/oAKEg5V1M="; @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { resolution by common Unix/Linux programs in the ad-hoc mDNS domain `.local'. ''; - homepage = "http://0pointer.de/lennart/projects/nss-mdns/"; + homepage = "https://github.com/avahi/nss-mdns/"; license = lib.licenses.lgpl2Plus; # Supports both the GNU and FreeBSD NSS. platforms = lib.platforms.gnu ++ lib.platforms.linux ++ lib.platforms.freebsd;