@@ -1,6 +1,10 @@
11{ stdenv, fetchurl, pkgconfig, intltool, gtk, libxfce4util, libxfce4ui
2−, libwnck, exo, garcon, xfconf, libstartup_notification
3−, makeWrapper, xfce4mixer }:
2+, libxfce4ui_gtk3, libwnck, exo, garcon, xfconf, libstartup_notification
3+, makeWrapper, xfce4mixer
4+, withGtk3 ? false, gtk3
5+}:
6+
7+with { inherit (stdenv.lib) optional; };
48
59stdenv.mkDerivation rec {
610 p_name = "xfce4-panel";
@@ -16,11 +20,15 @@ stdenv.mkDerivation rec {
1620 patches = [ ./xfce4-panel-datadir.patch ];
1721 patchFlags = "-p1";
1822
23+ configureFlags = optional withGtk3 "--enable-gtk3";
24+
1925 buildInputs =
2026 [ pkgconfig intltool gtk libxfce4util exo libwnck
2127 garcon xfconf libstartup_notification makeWrapper
22− ] ++ xfce4mixer.gst_plugins;
23− propagatedBuildInputs = [ libxfce4ui ];
28+ ] ++ xfce4mixer.gst_plugins
29+ ++ optional withGtk3 gtk3;
30+
31+ propagatedBuildInputs = [ (if withGtk3 then libxfce4ui_gtk3 else libxfce4ui) ];
2432
2533 postInstall = ''
2634 wrapProgram "$out/bin/xfce4-panel" \