2010-06-21 18:06:18 +02:00
|
|
|
{ gtkWidgets ? false # build GTK widgets for libinfinity
|
|
|
|
, daemon ? false # build infinote daemon
|
|
|
|
, documentation ? false # build documentation
|
|
|
|
, avahiSupport ? false # build support for Avahi in libinfinity
|
|
|
|
, stdenv, fetchurl, pkgconfig, glib, libxml2, gnutls, gsasl
|
2012-11-20 22:21:47 +01:00
|
|
|
, gtk ? null, gtkdoc ? null, avahi ? null, libdaemon ? null, libidn, gss }:
|
2010-06-21 18:06:18 +02:00
|
|
|
|
|
|
|
let
|
|
|
|
edf = flag: feature: (if flag then "--with-" else "--without-") + feature;
|
|
|
|
optional = cond: elem: assert cond -> elem != null; if cond then [elem] else [];
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
|
2014-03-01 04:19:40 +01:00
|
|
|
name = "libinfinity-0.5.5";
|
2010-06-21 18:06:18 +02:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://releases.0x539.de/libinfinity/${name}.tar.gz";
|
2014-03-01 04:19:40 +01:00
|
|
|
sha256 = "1i4cnwbvfv56m7zyyf9wki2bj000r8md414yv3cf1jdz4jbyxij7";
|
2010-06-21 18:06:18 +02:00
|
|
|
};
|
|
|
|
|
2012-11-20 22:21:47 +01:00
|
|
|
buildInputs = [ pkgconfig glib libxml2 gsasl libidn gss ]
|
2010-06-21 18:06:18 +02:00
|
|
|
++ optional gtkWidgets gtk
|
|
|
|
++ optional documentation gtkdoc
|
|
|
|
++ optional avahiSupport avahi
|
|
|
|
++ optional daemon libdaemon;
|
2010-10-04 06:15:50 +02:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ gnutls ];
|
2010-06-21 18:06:18 +02:00
|
|
|
|
|
|
|
configureFlags = ''
|
|
|
|
${if documentation then "--enable-gtk-doc" else "--disable-gtk-doc"}
|
|
|
|
${edf gtkWidgets "inftextgtk"}
|
|
|
|
${edf gtkWidgets "infgtk"}
|
|
|
|
${edf daemon "infinoted"}
|
|
|
|
${edf daemon "libdaemon"}
|
|
|
|
${edf avahiSupport "avahi"}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://gobby.0x539.de/;
|
|
|
|
description = "An implementation of the Infinote protocol written in GObject-based C";
|
|
|
|
license = "LGPLv2+";
|
|
|
|
maintainers = [ stdenv.lib.maintainers.phreedom ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|