at v192 1.5 kB view raw
1{ gtkWidgets ? false # build GTK widgets for libinfinity 2, daemon ? false # build infinote daemon 3, documentation ? false # build documentation 4, avahiSupport ? false # build support for Avahi in libinfinity 5, stdenv, fetchurl, pkgconfig, glib, libxml2, gnutls, gsasl 6, gtk ? null, gtkdoc ? null, avahi ? null, libdaemon ? null, libidn, gss }: 7 8let 9 edf = flag: feature: (if flag then "--with-" else "--without-") + feature; 10 optional = cond: elem: assert cond -> elem != null; if cond then [elem] else []; 11 12in stdenv.mkDerivation rec { 13 14 name = "libinfinity-0.6.5"; 15 src = fetchurl { 16 url = "http://releases.0x539.de/libinfinity/${name}.tar.gz"; 17 sha256 = "1idsxb6rz4i55g3vi2sv7hmm57psbccpb57yc4jgphaq6ydgqsr6"; 18 }; 19 20 buildInputs = [ pkgconfig glib libxml2 gsasl libidn gss ] 21 ++ optional gtkWidgets gtk 22 ++ optional documentation gtkdoc 23 ++ optional avahiSupport avahi 24 ++ optional daemon libdaemon; 25 26 propagatedBuildInputs = [ gnutls ]; 27 28 configureFlags = '' 29 ${if documentation then "--enable-gtk-doc" else "--disable-gtk-doc"} 30 ${edf gtkWidgets "inftextgtk"} 31 ${edf gtkWidgets "infgtk"} 32 ${edf daemon "infinoted"} 33 ${edf daemon "libdaemon"} 34 ${edf avahiSupport "avahi"} 35 ''; 36 37 meta = { 38 homepage = http://gobby.0x539.de/; 39 description = "An implementation of the Infinote protocol written in GObject-based C"; 40 license = stdenv.lib.licenses.lgpl2Plus; 41 maintainers = [ stdenv.lib.maintainers.phreedom ]; 42 }; 43 44}