Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchbzr
2, pkg-config, systemd, autoreconfHook
3, glib, dbus-glib, json-glib
4, gtk3, libindicator-gtk3, libdbusmenu-gtk3, libappindicator-gtk3 }:
5
6stdenv.mkDerivation rec {
7 pname = "indicator-application";
8 version = "12.10.1";
9
10 name = "${pname}-gtk3-${version}";
11
12 src = fetchbzr {
13 url = "https://code.launchpad.net/~indicator-applet-developers/${pname}/trunk.17.04";
14 rev = "260";
15 sha256 = "1f0jdyqqb5g86zdpbcyn16x94yjigsfiv2kf73dvni5rp1vafbq1";
16 };
17
18 nativeBuildInputs = [ pkg-config autoreconfHook ];
19
20 buildInputs = [
21 glib dbus-glib json-glib systemd
22 gtk3 libindicator-gtk3 libdbusmenu-gtk3 libappindicator-gtk3
23 ];
24
25 postPatch = ''
26 substituteInPlace data/Makefile.am \
27 --replace "/etc/xdg/autostart" "$out/etc/xdg/autostart"
28 '';
29
30 configureFlags = [
31 "CFLAGS=-Wno-error"
32 "--sysconfdir=/etc"
33 "--localstatedir=/var"
34 ];
35
36 installFlags = [
37 "sysconfdir=\${out}/etc"
38 "localstatedir=\${TMPDIR}"
39 ];
40
41 PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "$(out)/lib/systemd/user";
42 PKG_CONFIG_INDICATOR3_0_4_INDICATORDIR = "$(out)/lib/indicators3/7/";
43
44 # Upstart is not used in NixOS
45 postFixup = ''
46 rm -rf $out/share/indicator-application/upstart
47 rm -rf $out/share/upstart
48 '';
49
50 meta = with lib; {
51 description = "Indicator to take menus from applications and place them in the panel";
52 homepage = "https://launchpad.net/indicator-application";
53 license = licenses.gpl3;
54 platforms = platforms.linux;
55 maintainers = [ maintainers.msteen ];
56 };
57}