1 { gtkWidgets ? false # build GTK widgets for libinfinity
2 , avahiSupport ? false # build support for Avahi in libinfinity
3 , lib, stdenv, fetchurl, pkg-config, glib, libxml2, gnutls, gsasl
4 , gobject-introspection
5 , gtk3 ? null, gtk-doc, docbook_xsl, docbook_xml_dtd_412, avahi ? null, libdaemon, libidn, gss
8 assert avahiSupport -> avahi != null;
9 assert gtkWidgets -> gtk3 != null;
12 self = stdenv.mkDerivation rec {
13 pname = "libinfinity";
16 url = "https://github.com/gobby/${pname}/releases/download/${version}/${pname}-${version}.tar.gz";
17 sha256 = "17i3g61hxz9pzl3ryd1yr15142r25m06jfzjrpdy7ic1b8vjjw3f";
20 outputs = [ "bin" "out" "dev" "man" "devdoc" ];
22 nativeBuildInputs = [ pkg-config gtk-doc docbook_xsl docbook_xml_dtd_412 gobject-introspection ];
23 buildInputs = [ glib libxml2 gsasl libidn gss libintl libdaemon ]
24 ++ lib.optional gtkWidgets gtk3
25 ++ lib.optional avahiSupport avahi;
27 propagatedBuildInputs = [ gnutls ];
30 (lib.enableFeature true "gtk-doc")
31 (lib.enableFeature true "introspection")
32 (lib.withFeature gtkWidgets "inftextgtk")
33 (lib.withFeature gtkWidgets "infgtk")
34 (lib.withFeature true "infinoted")
35 (lib.withFeature true "libdaemon")
36 (lib.withFeature avahiSupport "avahi")
40 infinoted = "${self.bin}/bin/infinoted-${lib.versions.majorMinor version}";
44 homepage = "https://gobby.github.io/";
45 description = "An implementation of the Infinote protocol written in GObject-based C";
46 license = lib.licenses.lgpl2Plus;
48 platforms = with lib.platforms; linux ++ darwin;