2010-06-21 09:06:18 -07: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
|
2017-04-20 17:56:54 -07:00
|
|
|
, gtk2 ? null, gtkdoc ? null, avahi ? null, libdaemon ? null, libidn, gss
|
2018-03-14 12:15:06 -07:00
|
|
|
, libintl }:
|
2010-06-21 09:06:18 -07: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 {
|
|
|
|
|
2016-11-24 06:40:04 -08:00
|
|
|
name = "libinfinity-${version}";
|
|
|
|
version = "0.7.1";
|
2010-06-21 09:06:18 -07:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://releases.0x539.de/libinfinity/${name}.tar.gz";
|
2018-02-26 20:39:41 -08:00
|
|
|
sha256 = "1jw2fhrcbpyz99bij07iyhy9ffyqdn87vl8cb1qz897y3f2f0vk2";
|
2010-06-21 09:06:18 -07:00
|
|
|
};
|
|
|
|
|
2017-09-05 14:26:13 -07:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2018-03-14 12:15:06 -07:00
|
|
|
buildInputs = [ glib libxml2 gsasl libidn gss libintl ]
|
2016-09-13 10:42:55 -07:00
|
|
|
++ optional gtkWidgets gtk2
|
2010-06-21 09:06:18 -07:00
|
|
|
++ optional documentation gtkdoc
|
|
|
|
++ optional avahiSupport avahi
|
|
|
|
++ optional daemon libdaemon;
|
2010-10-03 21:15:50 -07:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ gnutls ];
|
2018-03-14 12:15:06 -07:00
|
|
|
|
2010-06-21 09:06:18 -07: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"}
|
|
|
|
'';
|
|
|
|
|
2016-11-24 06:40:04 -08:00
|
|
|
passthru = {
|
|
|
|
inherit version;
|
|
|
|
};
|
|
|
|
|
2010-06-21 09:06:18 -07:00
|
|
|
meta = {
|
|
|
|
homepage = http://gobby.0x539.de/;
|
|
|
|
description = "An implementation of the Infinote protocol written in GObject-based C";
|
2014-06-18 21:19:00 -07:00
|
|
|
license = stdenv.lib.licenses.lgpl2Plus;
|
2010-06-21 09:06:18 -07:00
|
|
|
maintainers = [ stdenv.lib.maintainers.phreedom ];
|
2017-04-20 17:56:54 -07:00
|
|
|
platforms = with stdenv.lib.platforms; linux ++ darwin;
|
2010-06-21 09:06:18 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|