summary refs log tree commit diff
path: root/pkgs/development/libraries/avahi/default.nix
blob: 54bf25500358fe3ae22e225658fa6def7c146bcf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{ fetchurl, stdenv, pkgconfig, libdaemon, dbus, perl, perlXMLParser
, expat, gettext, intltool, glib, gtk, qt4 ? null, lib
, qt4Support ? false, ...}:

assert qt4Support -> qt4 != null;

stdenv.mkDerivation rec {
  name = "avahi-0.6.25";
  src = fetchurl {
    url = "${meta.homepage}/download/${name}.tar.gz";
    sha256 = "0ndsrd357igp0m2cd8vwr16gmh6axlndf34hlg7qqnsiymsdj84j";
  };

  patches = [ ./no-mkdir-localstatedir.patch ];

  buildInputs = [
      pkgconfig libdaemon dbus perl perlXMLParser glib expat
      gettext intltool
    ]
    ++ (lib.optional qt4Support qt4);

  configureFlags =
    [ "--disable-qt3" "--disable-gdbm" "--disable-gtk" "--disable-mono"
      "--${if qt4Support then "enable" else "disable"}-qt4" "--disable-python"
      "--with-distro=none" "--localstatedir=/var"
    ];

  meta = {
    description = "Avahi, an mDNS/DNS-SD implementation";
    longDescription = ''
      Avahi is a system which facilitates service discovery on a local
      network.  It is an implementation of the mDNS (for "Multicast
      DNS") and DNS-SD (for "DNS-Based Service Discovery")
      protocols.
    '';

    homepage = http://avahi.org;
    license = "LGPLv2+";

    platforms = stdenv.lib.platforms.gnu;  # arbitrary choice
    maintainers = [ stdenv.lib.maintainers.ludo ];
  };
}