2008-12-13 02:02:11 +03:00
|
|
|
{ fetchurl, stdenv, pkgconfig, libdaemon, dbus, perl, perlXMLParser
|
2013-07-07 14:35:25 +04:00
|
|
|
, expat, gettext, intltool, glib, libiconvOrEmpty
|
|
|
|
, qt4 ? null
|
2011-02-11 18:56:29 +03:00
|
|
|
, qt4Support ? false
|
2011-09-18 17:54:54 +04:00
|
|
|
, withLibdnssdCompat ? false }:
|
2008-02-18 23:48:36 +03:00
|
|
|
|
2008-03-06 19:42:34 +03:00
|
|
|
assert qt4Support -> qt4 != null;
|
|
|
|
|
2008-02-18 23:48:36 +03:00
|
|
|
stdenv.mkDerivation rec {
|
2011-09-18 17:54:54 +04:00
|
|
|
name = "avahi-0.6.30";
|
2010-10-05 19:15:49 +04:00
|
|
|
|
2008-02-18 23:48:36 +03:00
|
|
|
src = fetchurl {
|
|
|
|
url = "${meta.homepage}/download/${name}.tar.gz";
|
2011-09-18 17:54:54 +04:00
|
|
|
sha256 = "07zzaxs81rbrfhj0rnq616c3j37f3g84dn7d4q3h5l1r4dn33r7r";
|
2008-02-18 23:48:36 +03:00
|
|
|
};
|
|
|
|
|
2010-05-09 02:24:39 +04:00
|
|
|
patches = [ ./no-mkdir-localstatedir.patch ];
|
|
|
|
|
2011-09-18 17:54:54 +04:00
|
|
|
buildInputs = [ libdaemon dbus perl perlXMLParser glib expat ]
|
2012-04-05 19:11:19 +04:00
|
|
|
++ (stdenv.lib.optional qt4Support qt4)
|
|
|
|
++ libiconvOrEmpty;
|
2008-02-18 23:48:36 +03:00
|
|
|
|
2012-12-28 22:20:09 +04:00
|
|
|
nativeBuildInputs = [ pkgconfig gettext intltool ];
|
2011-09-18 17:54:54 +04:00
|
|
|
|
2010-05-09 02:24:39 +04:00
|
|
|
configureFlags =
|
2010-07-13 20:32:22 +04:00
|
|
|
[ "--disable-qt3" "--disable-gdbm" "--disable-mono"
|
|
|
|
"--disable-gtk" "--disable-gtk3"
|
|
|
|
"--${if qt4Support then "enable" else "disable"}-qt4"
|
2013-07-07 14:35:25 +04:00
|
|
|
"--disable-python" "--localstatedir=/var" "--with-distro=none" ]
|
|
|
|
++ stdenv.lib.optional withLibdnssdCompat "--enable-compat-libdns_sd"
|
|
|
|
# autoipd won't build on darwin
|
|
|
|
++ stdenv.lib.optional stdenv.isDarwin "--disable-autoipd";
|
|
|
|
|
|
|
|
preBuild = stdenv.lib.optionalString stdenv.isDarwin ''
|
|
|
|
sed -i '20 i\
|
|
|
|
#define __APPLE_USE_RFC_2292' \
|
|
|
|
avahi-core/socket.c
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2013-10-05 18:22:46 +04:00
|
|
|
description = "mDNS/DNS-SD implementation";
|
2013-07-07 14:35:25 +04:00
|
|
|
homepage = http://avahi.org;
|
|
|
|
license = licenses.lgpl2Plus;
|
|
|
|
platforms = platforms.unix;
|
2013-08-17 01:44:33 +04:00
|
|
|
maintainers = with maintainers; [ lovek323 ];
|
2013-07-07 14:35:25 +04:00
|
|
|
|
2008-03-20 17:35:03 +03:00
|
|
|
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.
|
|
|
|
'';
|
2008-02-18 23:48:36 +03:00
|
|
|
};
|
|
|
|
}
|