2015-11-02 14:23:35 +00:00
|
|
|
# TODO: Resolve the issues with the Mono bindings.
|
|
|
|
|
|
|
|
{ stdenv, fetchurl, lib, file
|
|
|
|
, pkgconfig, autoconf
|
|
|
|
, glib, dbus_glib, gtkVersion
|
|
|
|
, gtk2 ? null, libindicator-gtk2 ? null, libdbusmenu-gtk2 ? null
|
|
|
|
, gtk3 ? null, libindicator-gtk3 ? null, libdbusmenu-gtk3 ? null
|
2016-09-25 22:59:32 +01:00
|
|
|
, pythonPackages, gobjectIntrospection, vala_0_23
|
2016-09-13 18:42:55 +01:00
|
|
|
, monoSupport ? false, mono ? null, gtk-sharp-2_0 ? null
|
2015-11-02 14:23:35 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
2016-09-25 22:59:32 +01:00
|
|
|
let
|
|
|
|
inherit (pythonPackages) python pygobject2 pygtk;
|
|
|
|
in stdenv.mkDerivation rec {
|
2015-11-02 14:23:35 +00:00
|
|
|
name = let postfix = if gtkVersion == "2" && monoSupport then "sharp" else "gtk${gtkVersion}";
|
|
|
|
in "libappindicator-${postfix}-${version}";
|
|
|
|
version = "${versionMajor}.${versionMinor}";
|
|
|
|
versionMajor = "12.10";
|
|
|
|
versionMinor = "0";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "${meta.homepage}/${versionMajor}/${version}/+download/libappindicator-${version}.tar.gz";
|
|
|
|
sha256 = "17xlqd60v0zllrxp8bgq3k5a1jkj0svkqn8rzllcyjh8k0gpr46m";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkgconfig autoconf ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glib dbus_glib
|
2016-09-11 22:24:51 +01:00
|
|
|
python pygobject2 pygtk gobjectIntrospection vala_0_23
|
2015-11-02 14:23:35 +00:00
|
|
|
] ++ (if gtkVersion == "2"
|
2016-09-13 18:42:55 +01:00
|
|
|
then [ gtk2 libindicator-gtk2 libdbusmenu-gtk2 ] ++ optionals monoSupport [ mono gtk-sharp-2_0 ]
|
2015-11-02 14:23:35 +00:00
|
|
|
else [ gtk3 libindicator-gtk3 libdbusmenu-gtk3 ]);
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace configure.ac \
|
|
|
|
--replace '=codegendir pygtk-2.0' '=codegendir pygobject-2.0'
|
|
|
|
autoconf
|
|
|
|
substituteInPlace {configure,ltmain.sh,m4/libtool.m4} \
|
|
|
|
--replace /usr/bin/file ${file}/bin/file
|
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"CFLAGS=-Wno-error"
|
|
|
|
"--sysconfdir=/etc"
|
|
|
|
"--localstatedir=/var"
|
|
|
|
"--with-gtk=${gtkVersion}"
|
|
|
|
];
|
|
|
|
|
|
|
|
postConfigure = ''
|
|
|
|
substituteInPlace configure \
|
|
|
|
--replace /usr/bin/file ${file}/bin/file
|
|
|
|
'';
|
|
|
|
|
|
|
|
installFlags = [
|
|
|
|
"sysconfdir=\${out}/etc"
|
|
|
|
"localstatedir=\${TMPDIR}"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A library to allow applications to export a menu into the Unity Menu bar";
|
|
|
|
homepage = "https://launchpad.net/libappindicator";
|
|
|
|
license = with licenses; [ lgpl21 lgpl3 ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.msteen ];
|
|
|
|
};
|
|
|
|
}
|