Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 autoreconfHook,
4 pkg-config,
5 stdenv,
6 fetchFromGitHub,
7}:
8
9stdenv.mkDerivation rec {
10 pname = "nss-mdns";
11 version = "0.15.1";
12
13 src = fetchFromGitHub {
14 owner = "avahi";
15 repo = "nss-mdns";
16 rev = "v${version}";
17 hash = "sha256-iRaf9/gu9VkGi1VbGpxvC5q+0M8ivezCz/oAKEg5V1M=";
18 };
19
20 nativeBuildInputs = [
21 autoreconfHook
22 pkg-config
23 ];
24
25 # Note: Although `nss-mdns' works by talking to `avahi-daemon', it
26 # doesn't depend on the Avahi libraries. Instead, it contains
27 # hand-written D-Bus code to talk to the Avahi daemon.
28
29 configureFlags = [
30 # Try to use the Avahi daemon before resolving on our own.
31 "--enable-avahi"
32 # Connect to the daemon at `/var/run/avahi-daemon/socket'.
33 "--localstatedir=/var"
34 # Read configuration at `/etc/mdns.allow`, not `$out/etc/mdns.allow`.
35 "--sysconfdir=/etc"
36 ];
37
38 meta = {
39 description = "MDNS Name Service Switch (NSS) plug-in";
40 longDescription = ''
41 `nss-mdns' is a plugin for the GNU Name Service Switch (NSS)
42 functionality of the GNU C Library (glibc) providing host name
43 resolution via Multicast DNS (mDNS), effectively allowing name
44 resolution by common Unix/Linux programs in the ad-hoc mDNS
45 domain `.local'.
46 '';
47 homepage = "https://github.com/avahi/nss-mdns/";
48 license = lib.licenses.lgpl2Plus;
49 # Supports both the GNU and FreeBSD NSS.
50 platforms = lib.platforms.gnu ++ lib.platforms.linux ++ lib.platforms.freebsd;
51 maintainers = [ ];
52 };
53}