Files
nixpkgs/pkgs/development/libraries/libinfinity/default.nix
T

49 lines
1.6 KiB
Nix
Raw Normal View History

2010-06-21 16:06:18 +00: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 19:56:54 -05:00
, gtk2 ? null, gtkdoc ? null, avahi ? null, libdaemon ? null, libidn, gss
, libintlOrEmpty }:
2010-06-21 16:06:18 +00: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 {
2015-03-10 14:35:12 +01:00
name = "libinfinity-0.6.5";
2010-06-21 16:06:18 +00:00
src = fetchurl {
url = "http://releases.0x539.de/libinfinity/${name}.tar.gz";
2015-03-10 14:35:12 +01:00
sha256 = "1idsxb6rz4i55g3vi2sv7hmm57psbccpb57yc4jgphaq6ydgqsr6";
2010-06-21 16:06:18 +00:00
};
2017-04-20 19:56:54 -05:00
buildInputs = [ pkgconfig glib libxml2 gsasl libidn gss libintlOrEmpty ]
2016-09-13 20:42:55 +03:00
++ optional gtkWidgets gtk2
2010-06-21 16:06:18 +00:00
++ optional documentation gtkdoc
++ optional avahiSupport avahi
++ optional daemon libdaemon;
2010-10-04 04:15:50 +00:00
propagatedBuildInputs = [ gnutls ];
2010-06-21 16:06:18 +00: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"}
'';
2017-04-20 19:56:54 -05:00
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl";
2010-06-21 16:06:18 +00:00
meta = {
homepage = http://gobby.0x539.de/;
description = "An implementation of the Infinote protocol written in GObject-based C";
license = stdenv.lib.licenses.lgpl2Plus;
2010-06-21 16:06:18 +00:00
maintainers = [ stdenv.lib.maintainers.phreedom ];
2017-04-20 19:56:54 -05:00
platforms = with stdenv.lib.platforms; linux ++ darwin;
2010-06-21 16:06:18 +00:00
};
}