about summary refs log tree commit diff
diff options
context:
space:
mode:
authorArseniy Seroka <jagajaga@users.noreply.github.com>2015-11-13 17:47:00 +0300
committerArseniy Seroka <jagajaga@users.noreply.github.com>2015-11-13 17:47:00 +0300
commit83ce6db83bbe950e376b80697ebd82ebb2b9a768 (patch)
treeb6f417166d9cce48d959e67a662705044d423cee
parentf7bd63dc77335b3a8834b9c759454fe0406fcd64 (diff)
parent1736cedc202bd22d5c9bbf5208c287faa45aed1f (diff)
downloadnixlib-83ce6db83bbe950e376b80697ebd82ebb2b9a768.tar
nixlib-83ce6db83bbe950e376b80697ebd82ebb2b9a768.tar.gz
nixlib-83ce6db83bbe950e376b80697ebd82ebb2b9a768.tar.bz2
nixlib-83ce6db83bbe950e376b80697ebd82ebb2b9a768.tar.lz
nixlib-83ce6db83bbe950e376b80697ebd82ebb2b9a768.tar.xz
nixlib-83ce6db83bbe950e376b80697ebd82ebb2b9a768.tar.zst
nixlib-83ce6db83bbe950e376b80697ebd82ebb2b9a768.zip
Merge pull request #10771 from demin-dmitriy/pulseaudio-panel-plugin
xfce4-pulseaudio-plugin: init at 0.2.3
-rw-r--r--pkgs/desktops/xfce/core/libxfce4ui.nix15
-rw-r--r--pkgs/desktops/xfce/core/xfce4-panel.nix16
-rw-r--r--pkgs/desktops/xfce/default.nix7
-rw-r--r--pkgs/desktops/xfce/panel-plugins/xfce4-pulseaudio-plugin.nix36
4 files changed, 60 insertions, 14 deletions
diff --git a/pkgs/desktops/xfce/core/libxfce4ui.nix b/pkgs/desktops/xfce/core/libxfce4ui.nix
index be4ca5d17c09..2cb20febcb94 100644
--- a/pkgs/desktops/xfce/core/libxfce4ui.nix
+++ b/pkgs/desktops/xfce/core/libxfce4ui.nix
@@ -1,5 +1,9 @@
 { stdenv, fetchurl, pkgconfig, intltool, gtk, libxfce4util, xfconf
-, libglade, libstartup_notification }:
+, libglade, libstartup_notification
+, withGtk3 ? false, gtk3
+}:
+
+with { inherit (stdenv.lib) optional; };
 
 stdenv.mkDerivation rec {
   p_name  = "libxfce4ui";
@@ -14,15 +18,14 @@ stdenv.mkDerivation rec {
 
   #TODO: gladeui
   # Install into our own prefix instead.
-  preConfigure =
-    ''
-      configureFlags="--with-libglade-module-path=$out/lib/libglade/2.0"
-    '';
+  configureFlags = [
+    "--with-libglade-module-path=$out/lib/libglade/2.0"
+  ] ++ optional withGtk3 "--enable-gtk3";
 
   buildInputs =
     [ pkgconfig intltool gtk libxfce4util xfconf libglade
       libstartup_notification
-    ];
+    ] ++ optional withGtk3 gtk3;
 
   preFixup = "rm $out/share/icons/hicolor/icon-theme.cache";
 
diff --git a/pkgs/desktops/xfce/core/xfce4-panel.nix b/pkgs/desktops/xfce/core/xfce4-panel.nix
index 5a8cc9dc0e52..0f9066876c66 100644
--- a/pkgs/desktops/xfce/core/xfce4-panel.nix
+++ b/pkgs/desktops/xfce/core/xfce4-panel.nix
@@ -1,6 +1,10 @@
 { stdenv, fetchurl, pkgconfig, intltool, gtk, libxfce4util, libxfce4ui
-, libwnck, exo, garcon, xfconf, libstartup_notification
-, makeWrapper, xfce4mixer }:
+, libxfce4ui_gtk3, libwnck, exo, garcon, xfconf, libstartup_notification
+, makeWrapper, xfce4mixer
+, withGtk3 ? false, gtk3
+}:
+
+with { inherit (stdenv.lib) optional; };
 
 stdenv.mkDerivation rec {
   p_name  = "xfce4-panel";
@@ -16,11 +20,15 @@ stdenv.mkDerivation rec {
   patches = [ ./xfce4-panel-datadir.patch ];
   patchFlags = "-p1";
 
+  configureFlags = optional withGtk3 "--enable-gtk3";
+
   buildInputs =
     [ pkgconfig intltool gtk libxfce4util exo libwnck
       garcon xfconf libstartup_notification makeWrapper
-    ] ++ xfce4mixer.gst_plugins;
-  propagatedBuildInputs = [ libxfce4ui ];
+    ] ++ xfce4mixer.gst_plugins
+      ++ optional withGtk3 gtk3;
+
+  propagatedBuildInputs = [ (if withGtk3 then libxfce4ui_gtk3 else libxfce4ui) ];
 
   postInstall = ''
     wrapProgram "$out/bin/xfce4-panel" \
diff --git a/pkgs/desktops/xfce/default.nix b/pkgs/desktops/xfce/default.nix
index e83eb9737f6b..b7e233d5766f 100644
--- a/pkgs/desktops/xfce/default.nix
+++ b/pkgs/desktops/xfce/default.nix
@@ -23,6 +23,7 @@ xfce_self = rec { # the lines are very long but it seems better than the even-od
   garcon          = callPackage ./core/garcon.nix { };
   gtk_xfce_engine = callPackage ./core/gtk-xfce-engine.nix { }; # ToDo: when should be used?
   libxfce4ui      = callPackage ./core/libxfce4ui.nix { };
+  libxfce4ui_gtk3 = libxfce4ui.override { withGtk3 = true; };
   libxfce4util    = callPackage ./core/libxfce4util.nix { };
   libxfcegui4     = callPackage ./core/libxfcegui4.nix { };
   thunar          = callPackage ./core/thunar.nix { };
@@ -33,6 +34,7 @@ xfce_self = rec { # the lines are very long but it seems better than the even-od
                   = callPackage ./thunar-plugins/dropbox { };
   tumbler         = callPackage ./core/tumbler.nix { };
   xfce4panel      = callPackage ./core/xfce4-panel.nix { }; # ToDo: impure plugins from /run/current-system/sw/lib/xfce4
+  xfce4panel_gtk3 = xfce4panel.override { withGtk3 = true; };
   xfce4session    = callPackage ./core/xfce4-session.nix { };
   xfce4settings   = callPackage ./core/xfce4-settings.nix { };
   xfce4_power_manager = callPackage ./core/xfce4-power-manager.nix { };
@@ -68,7 +70,6 @@ xfce_self = rec { # the lines are very long but it seems better than the even-od
 
   #### PANEL PLUGINS        from "mirror://xfce/src/panel-plugins/${p_name}/${ver_maj}/${name}.tar.{bz2,gz}"
 
-
   xfce4_battery_plugin     = callPackage ./panel-plugins/xfce4-battery-plugin.nix     { };
   xfce4_clipman_plugin     = callPackage ./panel-plugins/xfce4-clipman-plugin.nix     { };
   xfce4_cpufreq_plugin     = callPackage ./panel-plugins/xfce4-cpufreq-plugin.nix     { };
@@ -79,15 +80,13 @@ xfce_self = rec { # the lines are very long but it seems better than the even-od
   xfce4_eyes_plugin        = callPackage ./panel-plugins/xfce4-eyes-plugin.nix        { };
   xfce4_fsguard_plugin     = callPackage ./panel-plugins/xfce4-fsguard-plugin.nix     { };
   xfce4_genmon_plugin      = callPackage ./panel-plugins/xfce4-genmon-plugin.nix      { };
-
   xfce4_netload_plugin     = callPackage ./panel-plugins/xfce4-netload-plugin.nix     { };
   xfce4_notes_plugin       = callPackage ./panel-plugins/xfce4-notes-plugin.nix       { };
   xfce4_systemload_plugin  = callPackage ./panel-plugins/xfce4-systemload-plugin.nix  { };
   xfce4_verve_plugin       = callPackage ./panel-plugins/xfce4-verve-plugin.nix       { };
   xfce4_xkb_plugin         = callPackage ./panel-plugins/xfce4-xkb-plugin.nix         { };
-
   xfce4_whiskermenu_plugin = callPackage ./panel-plugins/xfce4-whiskermenu-plugin.nix { };
-
+  xfce4_pulseaudio_plugin  = callPackage ./panel-plugins/xfce4-pulseaudio-plugin.nix  { };
 
 }; # xfce_self
 
diff --git a/pkgs/desktops/xfce/panel-plugins/xfce4-pulseaudio-plugin.nix b/pkgs/desktops/xfce/panel-plugins/xfce4-pulseaudio-plugin.nix
new file mode 100644
index 000000000000..1b963237c02c
--- /dev/null
+++ b/pkgs/desktops/xfce/panel-plugins/xfce4-pulseaudio-plugin.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchurl, pkgconfig, intltool, libxfce4util, xfce4panel_gtk3, xfconf
+, gtk3, libpulseaudio
+, withKeybinder ? true, keybinder3
+, withLibnotify ? true, libnotify
+}:
+
+assert withKeybinder -> keybinder3 != null;
+assert withLibnotify -> libnotify != null;
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+  p_name  = "xfce4-pulseaudio-plugin";
+  ver_maj = "0.2";
+  ver_min = "3";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/panel-plugins/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "e82836bc8cf7d905b4e60d43dc630ba8e32dea785989700c71d4aeee9f583b33";
+  };
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  nativeBuildInputs = [ pkgconfig intltool ];
+  buildInputs = [ libxfce4util xfce4panel_gtk3 xfconf gtk3 libpulseaudio ]
+    ++ optional withKeybinder keybinder3
+    ++ optional withLibnotify libnotify;
+
+  preFixup = "rm $out/share/icons/hicolor/icon-theme.cache";
+
+  meta = {
+    homepage = "http://goodies.xfce.org/projects/panel-plugins/${p_name}";
+    description = "Adjust the audio volume of the PulseAudio sound system";
+    platforms = platforms.linux;
+    maintainers = [ ];
+  };
+}