2008-12-13 00:02:11 +01:00
|
|
|
{ fetchurl, stdenv, pkgconfig, libdaemon, dbus, perl, perlXMLParser
|
2013-07-07 12:35:25 +02:00
|
|
|
, expat, gettext, intltool, glib, libiconvOrEmpty
|
|
|
|
, qt4 ? null
|
2011-02-11 16:56:29 +01:00
|
|
|
, qt4Support ? false
|
2011-09-18 15:54:54 +02:00
|
|
|
, withLibdnssdCompat ? false }:
|
2008-02-18 21:48:36 +01:00
|
|
|
|
2008-03-06 17:42:34 +01:00
|
|
|
assert qt4Support -> qt4 != null;
|
|
|
|
|
2008-02-18 21:48:36 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2013-12-03 02:48:20 +01:00
|
|
|
name = "avahi-0.6.31";
|
2010-10-05 17:15:49 +02:00
|
|
|
|
2008-02-18 21:48:36 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "${meta.homepage}/download/${name}.tar.gz";
|
2013-12-03 02:48:20 +01:00
|
|
|
sha256 = "0j5b5ld6bjyh3qhd2nw0jb84znq0wqai7fsrdzg7bpg24jdp2wl3";
|
2008-02-18 21:48:36 +01:00
|
|
|
};
|
|
|
|
|
2010-05-09 00:24:39 +02:00
|
|
|
patches = [ ./no-mkdir-localstatedir.patch ];
|
|
|
|
|
2011-09-18 15:54:54 +02:00
|
|
|
buildInputs = [ libdaemon dbus perl perlXMLParser glib expat ]
|
2012-04-05 17:11:19 +02:00
|
|
|
++ (stdenv.lib.optional qt4Support qt4)
|
|
|
|
++ libiconvOrEmpty;
|
2008-02-18 21:48:36 +01:00
|
|
|
|
2012-12-28 19:20:09 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig gettext intltool ];
|
2011-09-18 15:54:54 +02:00
|
|
|
|
2010-05-09 00:24:39 +02:00
|
|
|
configureFlags =
|
2010-07-13 18:32:22 +02:00
|
|
|
[ "--disable-qt3" "--disable-gdbm" "--disable-mono"
|
|
|
|
"--disable-gtk" "--disable-gtk3"
|
|
|
|
"--${if qt4Support then "enable" else "disable"}-qt4"
|
2013-07-07 12:35:25 +02: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
|
|
|
|
'';
|
|
|
|
|
2013-12-03 02:48:20 +01:00
|
|
|
postInstall = ''
|
|
|
|
# Maintain compat for mdnsresponder and howl
|
|
|
|
${if withLibdnssdCompat then "ln -s avahi-compat-libdns_sd/dns_sd.h $out/include/dns_sd.h" else ""}
|
|
|
|
ln -s avahi-compat-howl $out/include/howl
|
|
|
|
ln -s avahi-compat-howl.pc $out/lib/pkgconfig/howl.pc
|
|
|
|
'';
|
|
|
|
|
2013-07-07 12:35:25 +02:00
|
|
|
meta = with stdenv.lib; {
|
2013-10-05 16:22:46 +02:00
|
|
|
description = "mDNS/DNS-SD implementation";
|
2013-07-07 12:35:25 +02:00
|
|
|
homepage = http://avahi.org;
|
|
|
|
license = licenses.lgpl2Plus;
|
|
|
|
platforms = platforms.unix;
|
2013-08-16 23:44:33 +02:00
|
|
|
maintainers = with maintainers; [ lovek323 ];
|
2013-07-07 12:35:25 +02:00
|
|
|
|
2008-03-20 15:35:03 +01: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 21:48:36 +01:00
|
|
|
};
|
|
|
|
}
|