2015-11-02 15:23:35 +01:00
|
|
|
# TODO: Resolve the issues with the Mono bindings.
|
|
|
|
|
|
|
|
{ stdenv, fetchurl, lib, file
|
|
|
|
, pkgconfig, autoconf
|
2018-05-01 20:51:03 +02:00
|
|
|
, glib, dbus-glib, gtkVersion ? "3"
|
2015-11-02 15:23:35 +01:00
|
|
|
, gtk2 ? null, libindicator-gtk2 ? null, libdbusmenu-gtk2 ? null
|
|
|
|
, gtk3 ? null, libindicator-gtk3 ? null, libdbusmenu-gtk3 ? null
|
2017-12-19 07:59:59 +01:00
|
|
|
, python2Packages, gobjectIntrospection, vala
|
2016-09-13 19:42:55 +02:00
|
|
|
, monoSupport ? false, mono ? null, gtk-sharp-2_0 ? null
|
2015-11-02 15:23:35 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
2016-09-25 23:59:32 +02:00
|
|
|
let
|
2016-11-09 12:08:39 +01:00
|
|
|
inherit (python2Packages) python pygobject2 pygtk;
|
2016-09-25 23:59:32 +02:00
|
|
|
in stdenv.mkDerivation rec {
|
2015-11-02 15:23:35 +01: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 ];
|
|
|
|
|
2017-04-03 16:25:12 +02:00
|
|
|
propagatedBuildInputs =
|
|
|
|
if gtkVersion == "2"
|
|
|
|
then [ gtk2 libdbusmenu-gtk2 ]
|
|
|
|
else [ gtk3 libdbusmenu-gtk3 ];
|
|
|
|
|
2015-11-02 15:23:35 +01:00
|
|
|
buildInputs = [
|
2018-02-25 03:23:58 +01:00
|
|
|
glib dbus-glib
|
2017-12-19 07:59:59 +01:00
|
|
|
python pygobject2 pygtk gobjectIntrospection vala
|
2015-11-02 15:23:35 +01:00
|
|
|
] ++ (if gtkVersion == "2"
|
2017-04-03 16:25:12 +02:00
|
|
|
then [ libindicator-gtk2 ] ++ optionals monoSupport [ mono gtk-sharp-2_0 ]
|
|
|
|
else [ libindicator-gtk3 ]);
|
2015-11-02 15:23:35 +01:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace configure.ac \
|
|
|
|
--replace '=codegendir pygtk-2.0' '=codegendir pygobject-2.0'
|
|
|
|
autoconf
|
2017-08-02 18:16:05 +02:00
|
|
|
for f in {configure,ltmain.sh,m4/libtool.m4}; do
|
|
|
|
substituteInPlace $f \
|
|
|
|
--replace /usr/bin/file ${file}/bin/file
|
|
|
|
done
|
2015-11-02 15:23:35 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"CFLAGS=-Wno-error"
|
|
|
|
"--sysconfdir=/etc"
|
|
|
|
"--localstatedir=/var"
|
|
|
|
"--with-gtk=${gtkVersion}"
|
|
|
|
];
|
|
|
|
|
|
|
|
postConfigure = ''
|
|
|
|
substituteInPlace configure \
|
|
|
|
--replace /usr/bin/file ${file}/bin/file
|
|
|
|
'';
|
|
|
|
|
2018-08-08 20:37:30 +02:00
|
|
|
doCheck = false; # generates shebangs in check phase, too lazy to fix
|
|
|
|
|
2015-11-02 15:23:35 +01:00
|
|
|
installFlags = [
|
|
|
|
"sysconfdir=\${out}/etc"
|
|
|
|
"localstatedir=\${TMPDIR}"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A library to allow applications to export a menu into the Unity Menu bar";
|
2017-08-01 22:03:30 +02:00
|
|
|
homepage = https://launchpad.net/libappindicator;
|
2015-11-02 15:23:35 +01:00
|
|
|
license = with licenses; [ lgpl21 lgpl3 ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.msteen ];
|
|
|
|
};
|
|
|
|
}
|