diff options
-rw-r--r-- | pkgs/tools/networking/nss-mdns/default.nix | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/pkgs/tools/networking/nss-mdns/default.nix b/pkgs/tools/networking/nss-mdns/default.nix index 1dd430c74931c..dfade68912490 100644 --- a/pkgs/tools/networking/nss-mdns/default.nix +++ b/pkgs/tools/networking/nss-mdns/default.nix @@ -1,25 +1,24 @@ -{ fetchurl, stdenv, avahi }: +{ fetchurl, stdenv }: stdenv.mkDerivation rec { name = "nss-mdns-0.10"; + src = fetchurl { url = "http://0pointer.de/lennart/projects/nss-mdns/${name}.tar.gz"; sha256 = "0vgs6j0qsl0mwzh5a0m0bykr7x6bx79vnbyn0r3q289rghp3qs0y"; }; - configureFlags = "--enable-avahi"; - # Note: Although `nss-mdns' works by talking to `avahi-daemon', it # doesn't depend on the Avahi libraries. Instead, it contains # hand-written D-Bus code to talk to the Avahi daemon. - buildInput = [ avahi ]; + configureFlags = + [ # Try to use the Avahi daemon before resolving on our own. + "--enable-avahi" - patchPhase = '' - substituteInPlace "src/Makefile.in" \ - --replace 'AVAHI_SOCKET=\"$(localstatedir)/run/avahi-daemon/socket\"' \ - 'AVAHI_SOCKET=\"${avahi}/var/run/avahi-daemon/socket\"' - ''; + # Connect to the daemon at `/var/run/avahi-daemon/socket'. + "--localstatedir=/var" + ]; meta = { description = "The mDNS Name Service Switch (NSS) plug-in"; @@ -33,5 +32,10 @@ stdenv.mkDerivation rec { homepage = http://0pointer.de/lennart/projects/nss-mdns/; license = "LGPLv2+"; + + # Supports both the GNU and FreeBSD NSS. + platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.freebsd; + + maintainers = [ stdenv.lib.maintainers.ludo ]; }; } |