summary refs log tree commit diff
path: root/pkgs/applications/window-managers/xmonad-log-applet/default.nix
blob: def5766e5ee1ebb8f15296668c96ccb559d8c2cd (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
{ stdenv, fetchFromGitHub, pkgconfig, autoreconfHook, glib, dbus-glib
, desktopSupport
, gtk2, gnome2_panel, GConf2
, libxfce4util, xfce4panel
}:

assert desktopSupport == "gnome2" || desktopSupport == "gnome3" || desktopSupport == "xfce4";

stdenv.mkDerivation rec {
  version = "2.1.0";
  pname = "xmonad-log-applet";
  name = "${pname}-${version}-${desktopSupport}";

  src = fetchFromGitHub {
    owner = "alexkay";
    repo = pname;
    rev = "${version}";
    sha256 = "1g1fisyaw83v72b25fxfjln8f4wlw3rm6nyk27mrqlhsc1spnb5p";
  };

  buildInputs =  with stdenv.lib;
                 [ glib dbus-glib ]
              ++ optionals (desktopSupport == "gnome2") [ gtk2 gnome2_panel GConf2 ]
              # TODO: no idea where to find libpanelapplet-4.0
              ++ optionals (desktopSupport == "gnome3") [ ]
              ++ optionals (desktopSupport == "xfce4") [ gtk2 libxfce4util xfce4panel ]
              ;
  
  nativeBuildInputs = [ autoreconfHook pkgconfig ];
  
  configureFlags =  [ "--with-panel=${desktopSupport}" ];
  
  patches = [ ./fix-paths.patch ];

  meta = with stdenv.lib; {
    homepage = https://github.com/alexkay/xmonad-log-applet;
    license = licenses.bsd3;
    description = "An applet that will display XMonad log information (${desktopSupport} version)";
    platforms = platforms.linux;
    maintainers = with maintainers; [ abbradar ];

    broken = desktopSupport == "gnome3";
  };
}