2010-06-21 16:06:18 +00:00
|
|
|
{ gtkWidgets ? false # build GTK widgets for libinfinity
|
|
|
|
, avahiSupport ? false # build support for Avahi in libinfinity
|
2021-01-21 17:00:13 +00:00
|
|
|
, lib, stdenv, fetchurl, pkg-config, glib, libxml2, gnutls, gsasl
|
2018-12-02 11:41:15 +00:00
|
|
|
, gobject-introspection
|
2018-08-07 23:31:21 +00: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 16:06:18 +00:00
|
|
|
|
2018-08-07 23:31:21 +00:00
|
|
|
assert avahiSupport -> avahi != null;
|
|
|
|
assert gtkWidgets -> gtk3 != null;
|
2010-06-21 16:06:18 +00:00
|
|
|
|
2018-08-07 23:31:21 +00:00
|
|
|
let
|
|
|
|
self = stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "libinfinity";
|
2020-12-11 23:13:19 +00:00
|
|
|
version = "0.7.2";
|
2018-08-07 23:31:21 +00:00
|
|
|
src = fetchurl {
|
2020-12-11 23:13:19 +00:00
|
|
|
url = "https://github.com/gobby/${pname}/releases/download/${version}/${pname}-${version}.tar.gz";
|
|
|
|
sha256 = "17i3g61hxz9pzl3ryd1yr15142r25m06jfzjrpdy7ic1b8vjjw3f";
|
2018-08-07 23:31:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "bin" "out" "dev" "man" "devdoc" ];
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config gtk-doc docbook_xsl docbook_xml_dtd_412 gobject-introspection ];
|
2018-08-07 23:31:21 +00:00
|
|
|
buildInputs = [ glib libxml2 gsasl libidn gss libintl libdaemon ]
|
2021-01-21 17:00:13 +00:00
|
|
|
++ lib.optional gtkWidgets gtk3
|
|
|
|
++ lib.optional avahiSupport avahi;
|
2018-08-07 23:31:21 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ gnutls ];
|
|
|
|
|
|
|
|
configureFlags = [
|
2022-06-29 19:29:59 +00:00
|
|
|
(lib.enableFeature true "gtk-doc")
|
|
|
|
(lib.enableFeature true "introspection")
|
|
|
|
(lib.withFeature gtkWidgets "inftextgtk")
|
|
|
|
(lib.withFeature gtkWidgets "infgtk")
|
|
|
|
(lib.withFeature true "infinoted")
|
|
|
|
(lib.withFeature true "libdaemon")
|
|
|
|
(lib.withFeature avahiSupport "avahi")
|
2018-08-07 23:31:21 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
passthru = {
|
2021-01-21 17:00:13 +00:00
|
|
|
infinoted = "${self.bin}/bin/infinoted-${lib.versions.majorMinor version}";
|
2018-08-07 23:31:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = {
|
2020-12-11 23:13:19 +00:00
|
|
|
homepage = "https://gobby.github.io/";
|
2018-08-07 23:31:21 +00:00
|
|
|
description = "An implementation of the Infinote protocol written in GObject-based C";
|
2021-01-21 17:00:13 +00:00
|
|
|
license = lib.licenses.lgpl2Plus;
|
2021-12-18 09:25:46 +00:00
|
|
|
maintainers = [ ];
|
2021-01-21 17:00:13 +00:00
|
|
|
platforms = with lib.platforms; linux ++ darwin;
|
2018-08-07 23:31:21 +00:00
|
|
|
};
|
2010-06-21 16:06:18 +00:00
|
|
|
};
|
2018-08-07 23:31:21 +00:00
|
|
|
in self
|