Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv, fetchurl, lib, file
2, pkg-config, autoconf
3, glib, dbus-glib, json-glib
4, gtk2, libindicator-gtk2, libdbusmenu-gtk2, libappindicator-gtk2 }:
5
6stdenv.mkDerivation rec {
7 pname = "indicator-application-gtk2";
8 version = "12.10.0.1";
9
10 src = fetchurl {
11 url = "${meta.homepage}/indicator-application-gtk2/i-a-${version}/+download/indicator-application-${version}.tar.gz";
12 sha256 = "1xqsb6c1pwawabw854f7aybjrgyhc2r1316i9lyjspci51zk5m7v";
13 };
14
15 nativeBuildInputs = [ pkg-config autoconf ];
16
17 buildInputs = [
18 glib dbus-glib json-glib
19 gtk2 libindicator-gtk2 libdbusmenu-gtk2 libappindicator-gtk2
20 ];
21
22 postPatch = ''
23 substituteInPlace configure.ac \
24 --replace 'DBUSSERVICEDIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1`' \
25 "DBUSSERVICEDIR=$out/share/dbus-1/services"
26 autoconf
27 for f in {configure,ltmain.sh,m4/libtool.m4}; do
28 substituteInPlace $f \
29 --replace /usr/bin/file ${file}/bin/file
30 done
31 substituteInPlace src/Makefile.in \
32 --replace 'applicationlibdir = $(INDICATORDIR)' "applicationlibdir = $out/lib"
33 '';
34
35 configureFlags = [
36 "CFLAGS=-Wno-error"
37 "--sysconfdir=/etc"
38 "--localstatedir=/var"
39 ];
40
41 installFlags = [
42 "sysconfdir=\${out}/etc"
43 "localstatedir=\${TMPDIR}"
44 ];
45
46 meta = with lib; {
47 description = "Indicator to take menus from applications and place them in the panel (GTK 2 library for Xfce/LXDE)";
48 homepage = "https://launchpad.net/indicators-gtk2";
49 license = licenses.gpl3;
50 platforms = platforms.linux;
51 maintainers = [ maintainers.msteen ];
52 };
53}