nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1# TODO: Resolve the issues with the Mono bindings.
2
3{ stdenv, fetchgit, lib
4, pkgconfig, autoreconfHook
5, glib, dbus-glib, gtkVersion ? "3"
6, gtk2 ? null, libindicator-gtk2 ? null, libdbusmenu-gtk2 ? null
7, gtk3 ? null, libindicator-gtk3 ? null, libdbusmenu-gtk3 ? null
8, gtk-doc, vala, gobject-introspection
9, monoSupport ? false, mono ? null, gtk-sharp-2_0 ? null
10 }:
11
12with lib;
13
14
15stdenv.mkDerivation rec {
16 name = let postfix = if gtkVersion == "2" && monoSupport then "sharp" else "gtk${gtkVersion}";
17 in "libappindicator-${postfix}-${version}";
18 version = "12.10.1+20.10.20200706.1";
19
20 outputs = [ "out" "dev" ];
21
22 src = fetchgit {
23 url = "https://git.launchpad.net/ubuntu/+source/libappindicator";
24 rev = "fe25e53bc7e39cd59ad6b3270cd7a6a9c78c4f44";
25 sha256 = "0xjvbl4gn7ra2fs6gn2g9s787kzb5cg9hv79iqsz949rxh4iw32d";
26 };
27
28 nativeBuildInputs = [ pkgconfig autoreconfHook vala gobject-introspection gtk-doc ];
29
30 propagatedBuildInputs =
31 if gtkVersion == "2"
32 then [ gtk2 libdbusmenu-gtk2 ]
33 else [ gtk3 libdbusmenu-gtk3 ];
34
35 buildInputs = [
36 glib dbus-glib
37 ] ++ (if gtkVersion == "2"
38 then [ libindicator-gtk2 ] ++ optionals monoSupport [ mono gtk-sharp-2_0 ]
39 else [ libindicator-gtk3 ]);
40
41 preAutoreconf = ''
42 gtkdocize
43 '';
44
45 configureFlags = [
46 "CFLAGS=-Wno-error"
47 "--sysconfdir=/etc"
48 "--localstatedir=/var"
49 "--with-gtk=${gtkVersion}"
50 ];
51
52 doCheck = false; # generates shebangs in check phase, too lazy to fix
53
54 installFlags = [
55 "sysconfdir=${placeholder "out"}/etc"
56 "localstatedir=\${TMPDIR}"
57 ];
58
59 meta = {
60 description = "A library to allow applications to export a menu into the Unity Menu bar";
61 homepage = "https://launchpad.net/libappindicator";
62 license = with licenses; [ lgpl21 lgpl3 ];
63 platforms = platforms.linux;
64 maintainers = [ maintainers.msteen ];
65 };
66}