2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, pkg-config, autoreconfHook, glib, dbus-glib
|
2020-04-24 23:36:52 +00:00
|
|
|
, desktopSupport ? "gnomeflashback", xorg
|
|
|
|
, gtk2
|
|
|
|
, gtk3, gnome3, mate
|
|
|
|
, libxfce4util, xfce4-panel
|
|
|
|
}:
|
|
|
|
|
|
|
|
assert desktopSupport == "gnomeflashback" || desktopSupport == "mate" || desktopSupport == "xfce4";
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "unstable-2017-09-15";
|
|
|
|
pname = "xmonad-log-applet";
|
|
|
|
name = "${pname}-${desktopSupport}-${version}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kalj";
|
|
|
|
repo = pname;
|
|
|
|
rev = "a1b294cad2f266e4f18d9de34167fa96a0ffdba8";
|
|
|
|
sha256 = "042307grf4zvn61gnflhsj5xsjykrk9sjjsprprm4iij0qpybxcw";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ glib dbus-glib xorg.xcbutilwm ]
|
2021-01-17 00:15:33 +00:00
|
|
|
++ lib.optionals (desktopSupport == "gnomeflashback") [ gtk3 gnome3.gnome-panel ]
|
|
|
|
++ lib.optionals (desktopSupport == "mate") [ gtk3 mate.mate-panel ]
|
|
|
|
++ lib.optionals (desktopSupport == "xfce4") [ gtk2 libxfce4util xfce4-panel ]
|
2020-04-24 23:36:52 +00:00
|
|
|
;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
configureFlags = [ "--with-panel=${desktopSupport}" ];
|
|
|
|
|
|
|
|
patches = [ ./fix-paths.patch ];
|
|
|
|
|
|
|
|
# Setup hook replaces ${prefix} in pc files so we cannot use
|
|
|
|
# --define-variable=prefix=$prefix
|
|
|
|
PKG_CONFIG_LIBXFCE4PANEL_1_0_LIBDIR = "$(out)/lib";
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/kalj/xmonad-log-applet";
|
|
|
|
license = licenses.bsd3;
|
2020-11-12 09:05:59 +00:00
|
|
|
broken = desktopSupport == "gnomeflashback";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "An applet that will display XMonad log information (${desktopSupport} version)";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ abbradar ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|