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