about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/indicator-application/gtk2.nix
blob: 9fe3575b7bc2a502c50f1257c949a3151a341a83 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{ stdenv, fetchurl, lib, file
, pkg-config, autoconf
, glib, dbus-glib, json-glib
, gtk2, libindicator-gtk2, libdbusmenu-gtk2, libappindicator-gtk2 }:

stdenv.mkDerivation rec {
  pname = "indicator-application-gtk2";
  version = "12.10.0.1";

  src = fetchurl {
    url = "${meta.homepage}/indicator-application-gtk2/i-a-${version}/+download/indicator-application-${version}.tar.gz";
    sha256 = "1xqsb6c1pwawabw854f7aybjrgyhc2r1316i9lyjspci51zk5m7v";
  };

  nativeBuildInputs = [ pkg-config autoconf ];

  buildInputs = [
    glib dbus-glib json-glib
    gtk2 libindicator-gtk2 libdbusmenu-gtk2 libappindicator-gtk2
  ];

  postPatch = ''
    substituteInPlace configure.ac \
      --replace 'DBUSSERVICEDIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1`' \
                "DBUSSERVICEDIR=$out/share/dbus-1/services"
    autoconf
    for f in {configure,ltmain.sh,m4/libtool.m4}; do
      substituteInPlace $f \
        --replace /usr/bin/file ${file}/bin/file
    done
    substituteInPlace src/Makefile.in \
      --replace 'applicationlibdir = $(INDICATORDIR)' "applicationlibdir = $out/lib"
  '';

  configureFlags = [
    "CFLAGS=-Wno-error"
    "--sysconfdir=/etc"
    "--localstatedir=/var"
  ];

  installFlags = [
    "sysconfdir=\${out}/etc"
    "localstatedir=\${TMPDIR}"
  ];

  meta = with lib; {
    description = "Indicator to take menus from applications and place them in the panel (GTK 2 library for Xfce/LXDE)";
    homepage = "https://launchpad.net/indicators-gtk2";
    license = licenses.gpl3;
    platforms = platforms.linux;
    maintainers = [ maintainers.msteen ];
  };
}