2010-06-21 17:06:18 +01:00
|
|
|
{ gtkWidgets ? false # build GTK widgets for libinfinity
|
|
|
|
, avahiSupport ? false # build support for Avahi in libinfinity
|
|
|
|
, stdenv, fetchurl, pkgconfig, glib, libxml2, gnutls, gsasl
|
2018-12-02 11:41:15 +00:00
|
|
|
, gobject-introspection
|
2018-08-08 00:31:21 +01:00
|
|
|
, gtk3 ? null, gtk-doc, docbook_xsl, docbook_xml_dtd_412, avahi ? null, libdaemon, libidn, gss
|
2018-03-14 19:15:06 +00:00
|
|
|
, libintl }:
|
2010-06-21 17:06:18 +01:00
|
|
|
|
2018-08-08 00:31:21 +01:00
|
|
|
assert avahiSupport -> avahi != null;
|
|
|
|
assert gtkWidgets -> gtk3 != null;
|
2010-06-21 17:06:18 +01:00
|
|
|
|
2018-08-08 00:31:21 +01:00
|
|
|
let
|
|
|
|
mkFlag = flag: feature: (if flag then "--with-" else "--without-") + feature;
|
|
|
|
|
|
|
|
self = stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "libinfinity";
|
2018-08-08 00:31:21 +01:00
|
|
|
version = "0.7.1";
|
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "http://releases.0x539.de/libinfinity/${pname}-${version}.tar.gz";
|
2018-08-08 00:31:21 +01:00
|
|
|
sha256 = "1jw2fhrcbpyz99bij07iyhy9ffyqdn87vl8cb1qz897y3f2f0vk2";
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "bin" "out" "dev" "man" "devdoc" ];
|
|
|
|
|
2018-12-02 11:41:15 +00:00
|
|
|
nativeBuildInputs = [ pkgconfig gtk-doc docbook_xsl docbook_xml_dtd_412 gobject-introspection ];
|
2018-08-08 00:31:21 +01:00
|
|
|
buildInputs = [ glib libxml2 gsasl libidn gss libintl libdaemon ]
|
|
|
|
++ stdenv.lib.optional gtkWidgets gtk3
|
|
|
|
++ stdenv.lib.optional avahiSupport avahi;
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ gnutls ];
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-gtk-doc"
|
|
|
|
"--enable-introspection"
|
|
|
|
(mkFlag gtkWidgets "inftextgtk")
|
|
|
|
(mkFlag gtkWidgets "infgtk")
|
|
|
|
"--with-infinoted"
|
|
|
|
"--with-libdaemon"
|
|
|
|
(mkFlag avahiSupport "avahi")
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
infinoted = "${self.bin}/bin/infinoted-${stdenv.lib.versions.majorMinor version}";
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://gobby.0x539.de/;
|
|
|
|
description = "An implementation of the Infinote protocol written in GObject-based C";
|
|
|
|
license = stdenv.lib.licenses.lgpl2Plus;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.phreedom ];
|
|
|
|
platforms = with stdenv.lib.platforms; linux ++ darwin;
|
|
|
|
};
|
2010-06-21 17:06:18 +01:00
|
|
|
};
|
2018-08-08 00:31:21 +01:00
|
|
|
in self
|