diff --git a/pkgs/applications/window-managers/xmonad/log-applet/default.nix b/pkgs/applications/window-managers/xmonad/log-applet/default.nix index 94c23e8a6824..b836c143c64b 100644 --- a/pkgs/applications/window-managers/xmonad/log-applet/default.nix +++ b/pkgs/applications/window-managers/xmonad/log-applet/default.nix @@ -1,44 +1,45 @@ { stdenv, fetchFromGitHub, pkgconfig, autoreconfHook, glib, dbus-glib -, desktopSupport +, desktopSupport, xlibs , gtk2 +, gtk3, gnome3 , libxfce4util, xfce4-panel }: -assert desktopSupport == "gnome3" || desktopSupport == "xfce4"; +assert desktopSupport == "gnomeflashback" || desktopSupport == "xfce4"; stdenv.mkDerivation rec { - version = "2.1.0"; + version = "unstable-2017-09-15"; pname = "xmonad-log-applet"; - name = "${pname}-${version}-${desktopSupport}"; + name = "${pname}-${desktopSupport}-${version}"; src = fetchFromGitHub { - owner = "alexkay"; + owner = "kalj"; repo = pname; - rev = "${version}"; - sha256 = "1g1fisyaw83v72b25fxfjln8f4wlw3rm6nyk27mrqlhsc1spnb5p"; + rev = "a1b294cad2f266e4f18d9de34167fa96a0ffdba8"; + sha256 = "042307grf4zvn61gnflhsj5xsjykrk9sjjsprprm4iij0qpybxcw"; }; - buildInputs = with stdenv.lib; - [ glib dbus-glib ] - # TODO: no idea where to find libpanelapplet-4.0 - ++ optionals (desktopSupport == "gnome3") [ ] - ++ optionals (desktopSupport == "xfce4") [ gtk2 libxfce4util xfce4-panel ] - ; - + buildInputs = [ glib dbus-glib xlibs.xcbutilwm ] + ++ stdenv.lib.optionals (desktopSupport == "gnomeflashback") [ gtk3 gnome3.gnome-panel ] + ++ stdenv.lib.optionals (desktopSupport == "xfce4") [ gtk2 libxfce4util xfce4-panel ] + ; + nativeBuildInputs = [ autoreconfHook pkgconfig ]; - + 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"; + meta = with stdenv.lib; { - homepage = https://github.com/alexkay/xmonad-log-applet; + homepage = https://github.com/kalj/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"; }; } diff --git a/pkgs/applications/window-managers/xmonad/log-applet/fix-paths.patch b/pkgs/applications/window-managers/xmonad/log-applet/fix-paths.patch index 031843afb172..5e1fc7114dc8 100644 --- a/pkgs/applications/window-managers/xmonad/log-applet/fix-paths.patch +++ b/pkgs/applications/window-managers/xmonad/log-applet/fix-paths.patch @@ -1,50 +1,57 @@ -diff --git a/Makefile.am b/Makefile.am -index 619012d..dcc6d3c 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -1,4 +1,5 @@ - plugindir = $(PLUGIN_DIR) -+SESSION_BUS_SERVICES_DIR = $(prefix)/share/dbus-1/services - plugin_PROGRAMS = xmonad-log-applet - - xmonad_log_applet_SOURCES = main.c -diff --git a/configure.ac b/configure.ac -index ad4cffb..110c953 100644 --- a/configure.ac +++ b/configure.ac -@@ -27,28 +27,28 @@ AC_ARG_WITH( +@@ -20,7 +20,7 @@ + PKG_CHECK_MODULES(XCB, xcb xcb-ewmh) + + PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1 >= 0.80) +-SESSION_BUS_SERVICES_DIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1` ++SESSION_BUS_SERVICES_DIR=$prefix/share/dbus-1/services + AC_SUBST([SESSION_BUS_SERVICES_DIR]) + + AC_ARG_WITH( +@@ -32,35 +32,35 @@ AS_IF( [test "x$panel" = xgnome2], [PKG_CHECK_MODULES(LIBPANEL, libpanelapplet-3.0 >= 2.32.0)] - LIBPANEL_APPLET_DIR=`$PKG_CONFIG --variable=prefix libpanelapplet-3.0`/share/gnome-panel/applets - PLUGIN_DIR=`$PKG_CONFIG --variable=prefix libpanelapplet-3.0`/libexec -+ LIBPANEL_APPLET_DIR=${prefix}/share/gnome-panel/applets -+ PLUGIN_DIR=${prefix}/libexec ++ LIBPANEL_APPLET_DIR=$prefix/share/gnome-panel/applets ++ PLUGIN_DIR=$prefix/libexec [AC_DEFINE(PANEL_GNOME, 1, [panel type])] [AC_DEFINE(PANEL_GNOME2, 1, [panel type])] , [test "x$panel" = xgnome3], [PKG_CHECK_MODULES(LIBPANEL, libpanelapplet-4.0 >= 3.0.0)] - LIBPANEL_APPLET_DIR=`$PKG_CONFIG --variable=libpanel_applet_dir libpanelapplet-4.0` +- LIBPANEL_APPLET_DIR=`$PKG_CONFIG --variable=libpanel_applet_dir libpanelapplet-4.0` - PLUGIN_DIR=`$PKG_CONFIG --variable=prefix libpanelapplet-4.0`/libexec -+ PLUGIN_DIR=${prefix}/libexec ++ LIBPANEL_APPLET_DIR=`$PKG_CONFIG --define-variable=prefix=$prefix --variable=libpanel_applet_dir libpanelapplet-4.0` ++ PLUGIN_DIR=$prefix/libexec [AC_DEFINE(PANEL_GNOME, 1, [panel type])] [AC_DEFINE(PANEL_GNOME3, 1, [panel type])] , + [test "x$panel" = xgnomeflashback], + [PKG_CHECK_MODULES(LIBPANEL, libpanel-applet >= 3.0.0)] +- LIBPANEL_APPLET_DIR=`$PKG_CONFIG --variable=libpanel_applet_dir libpanel-applet` +- PLUGIN_DIR=`$PKG_CONFIG --variable=prefix libpanel-applet`/libexec ++ LIBPANEL_APPLET_DIR=`$PKG_CONFIG --define-variable=prefix=$prefix --variable=libpanel_applet_dir libpanel-applet` ++ PLUGIN_DIR=$prefix/libexec + [AC_DEFINE(PANEL_GNOME, 1, [panel type])] + [AC_DEFINE(PANEL_GNOMEFLASHBACK, 1, [panel type])] + , [test "x$panel" = xmate], - [PKG_CHECK_MODULES(LIBPANEL, libmatepanelapplet-3.0 >= 1.4.0)] -- LIBPANEL_APPLET_DIR=`$PKG_CONFIG --variable=prefix libmatepanelapplet-3.0`/share/mate-panel/applets -- PLUGIN_DIR=`$PKG_CONFIG --variable=prefix libmatepanelapplet-3.0`/libexec -+ LIBPANEL_APPLET_DIR=${prefix}/share/mate-panel/applets -+ PLUGIN_DIR=${prefix}/libexec + [PKG_CHECK_MODULES(LIBPANEL, libmatepanelapplet-4.0 >= 1.4.0)] +- LIBPANEL_APPLET_DIR=`$PKG_CONFIG --variable=prefix libmatepanelapplet-4.0`/share/mate-panel/applets +- PLUGIN_DIR=`$PKG_CONFIG --variable=prefix libmatepanelapplet-4.0`/libexec ++ LIBPANEL_APPLET_DIR=$prefix/share/mate-panel/applets ++ PLUGIN_DIR=$prefix/libexec [AC_DEFINE(PANEL_MATE, 1, [panel type])] , [test "x$panel" = xxfce4], [PKG_CHECK_MODULES(LIBPANEL, libxfce4panel-1.0 >= 4.6.0)] - LIBPANEL_APPLET_DIR=`$PKG_CONFIG --variable=prefix libxfce4panel-1.0`/share/xfce4/panel-plugins - PLUGIN_DIR=`$PKG_CONFIG --variable=libdir libxfce4panel-1.0`/xfce4/panel/plugins -+ LIBPANEL_APPLET_DIR=${prefix}/share/xfce4/panel-plugins -+ PLUGIN_DIR=${prefix}/lib/xfce4/panel/plugins ++ LIBPANEL_APPLET_DIR=$prefix/share/xfce4/panel-plugins ++ PLUGIN_DIR=`$PKG_CONFIG --define-variable=prefix=$prefix --variable=libdir libxfce4panel-1.0`/xfce4/panel/plugins [AC_DEFINE(PANEL_XFCE4, 1, [panel type])] , - [AC_MSG_ERROR([Unknown panel type, use gnome2, gnome3, mate or xfce4])] + [AC_MSG_ERROR([Unknown panel type, use gnome2, gnome3, gnomeflashback, mate or xfce4])] diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ea1b022b95eb..7284f2bc5cb6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19284,7 +19284,7 @@ with pkgs; }; xmonad_log_applet = callPackage ../applications/window-managers/xmonad/log-applet { - desktopSupport = "gnome3"; + desktopSupport = "gnomeflashback"; inherit (xfce) libxfce4util xfce4-panel; };