1 { stdenv, fetchgit, lib
2 , pkg-config, autoreconfHook
5 , gtk2, libindicator-gtk2, libdbusmenu-gtk2
6 , gtk3, libindicator-gtk3, libdbusmenu-gtk3
7 , gtk-doc, vala, gobject-introspection
8 , monoSupport ? false, mono, gtk-sharp-2_0, gtk-sharp-3_0
13 throwBadGtkVersion = throw "unknown GTK version ${gtkVersion}";
16 stdenv.mkDerivation (finalAttrs: {
17 pname = let postfix = if monoSupport then "sharp" else "gtk${gtkVersion}";
18 in "libappindicator-${postfix}";
19 version = "12.10.1+20.10.20200706.1";
21 outputs = [ "out" "dev" ];
24 url = "https://git.launchpad.net/ubuntu/+source/libappindicator";
25 rev = "fe25e53bc7e39cd59ad6b3270cd7a6a9c78c4f44";
26 sha256 = "0xjvbl4gn7ra2fs6gn2g9s787kzb5cg9hv79iqsz949rxh4iw32d";
29 nativeBuildInputs = [ pkg-config autoreconfHook vala gobject-introspection gtk-doc ];
31 propagatedBuildInputs = {
32 "2" = [ gtk2 libdbusmenu-gtk2 ];
33 "3" = [ gtk3 libdbusmenu-gtk3 ];
34 }.${gtkVersion} or throwBadGtkVersion;
39 "2" = libindicator-gtk2;
40 "3" = libindicator-gtk3;
41 }.${gtkVersion} or throwBadGtkVersion
42 ] ++ lib.optionals monoSupport [
47 }.${gtkVersion} or throwBadGtkVersion
57 "--localstatedir=/var"
58 "--with-gtk=${gtkVersion}"
61 doCheck = false; # generates shebangs in check phase, too lazy to fix
64 "sysconfdir=${placeholder "out"}/etc"
65 "localstatedir=\${TMPDIR}"
68 passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
71 description = "Library to allow applications to export a menu into the Unity Menu bar";
72 homepage = "https://launchpad.net/libappindicator";
73 license = with licenses; [ lgpl21 lgpl3 ];
75 "2" = [ "appindicator-0.1" ];
76 "3" = [ "appindicator3-0.1" ];
77 }.${gtkVersion} or throwBadGtkVersion;
78 platforms = platforms.linux;
79 maintainers = [ maintainers.msteen ];
80 # TODO: Resolve the issues with the Mono bindings.