From aeaa96f7e48bcc88cab1e9b8c66ad764ec554959 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Thu, 23 Oct 2014 03:14:21 +0400 Subject: [PATCH] xfce4-volumed: add package (close #4628) --- .../services/x11/desktop-managers/xfce.nix | 1 + .../xfce/applications/xfce4-volumed-pulse.nix | 29 ++++++++++++ .../xfce/applications/xfce4-volumed.nix | 46 +++++++++++++++++++ pkgs/desktops/xfce/default.nix | 4 ++ 4 files changed, 80 insertions(+) create mode 100644 pkgs/desktops/xfce/applications/xfce4-volumed-pulse.nix create mode 100644 pkgs/desktops/xfce/applications/xfce4-volumed.nix diff --git a/nixos/modules/services/x11/desktop-managers/xfce.nix b/nixos/modules/services/x11/desktop-managers/xfce.nix index a31f66176cc9..6a14a163c19a 100644 --- a/nixos/modules/services/x11/desktop-managers/xfce.nix +++ b/nixos/modules/services/x11/desktop-managers/xfce.nix @@ -56,6 +56,7 @@ in pkgs.xfce.xfce4session pkgs.xfce.xfce4settings pkgs.xfce.xfce4mixer + pkgs.xfce.xfce4volumed pkgs.xfce.xfce4screenshooter pkgs.xfce.xfconf pkgs.xfce.xfdesktop diff --git a/pkgs/desktops/xfce/applications/xfce4-volumed-pulse.nix b/pkgs/desktops/xfce/applications/xfce4-volumed-pulse.nix new file mode 100644 index 000000000000..087ba0f2c815 --- /dev/null +++ b/pkgs/desktops/xfce/applications/xfce4-volumed-pulse.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchurl, pkgconfig, pulseaudio +, gtk2, libnotify +, keybinder, xfconf +}: + +stdenv.mkDerivation rec { + version = "0.2.0"; + name = "xfce4-volumed-pulse-${version}"; + + src = fetchurl { + url = "https://launchpad.net/xfce4-volumed-pulse/trunk/${version}/+download/${name}.tar.bz2"; + sha256 = "0l75gl96skm0zn10w70mwvsjd12p1zjshvn7yc3439dz61506c39"; + }; + + buildInputs = + [ pulseaudio gtk2 + keybinder xfconf libnotify + ]; + + nativeBuildInputs = [ pkgconfig ]; + + meta = with stdenv.lib; { + homepage = https://launchpad.net/xfce4-volumed-pulse; + description = "A volume keys control daemon for the Xfce desktop environment (Xubuntu fork)"; + license = licenses.gpl3; + platforms = platforms.linux; + maintainers = [ maintainers.abbradar ]; + }; +} diff --git a/pkgs/desktops/xfce/applications/xfce4-volumed.nix b/pkgs/desktops/xfce/applications/xfce4-volumed.nix new file mode 100644 index 000000000000..b603229e938d --- /dev/null +++ b/pkgs/desktops/xfce/applications/xfce4-volumed.nix @@ -0,0 +1,46 @@ +{ stdenv, fetchurl, pkgconfig, makeWrapper +, gstreamer, gtk2, gst_plugins_base, libnotify +, keybinder, xfconf +}: + +let + # The usual Gstreamer plugins package has a zillion dependencies + # that we don't need for a simple mixer, so build a minimal package. + gst_plugins_minimal = gst_plugins_base.override { + minimalDeps = true; + }; + +in + +stdenv.mkDerivation rec { + p_name = "xfce4-volumed"; + ver_maj = "0.1"; + ver_min = "13"; + + src = fetchurl { + url = "mirror://xfce/src/apps/${p_name}/${ver_maj}/${name}.tar.bz2"; + sha256 = "1aa0a1sbf9yzi7bc78kw044m0xzg1li3y4w9kf20wqv5kfjs7v2c"; + }; + name = "${p_name}-${ver_maj}.${ver_min}"; + + buildInputs = + [ gstreamer gst_plugins_minimal gtk2 + keybinder xfconf libnotify + ]; + + nativeBuildInputs = [ pkgconfig makeWrapper ]; + + postInstall = + '' + wrapProgram "$out/bin/xfce4-volumed" \ + --prefix GST_PLUGIN_SYSTEM_PATH : "$GST_PLUGIN_SYSTEM_PATH" + ''; + + meta = with stdenv.lib; { + homepage = http://www.xfce.org/projects/xfce4-volumed; # referenced but inactive + description = "A volume keys control daemon for the Xfce desktop environment"; + license = licenses.gpl3; + platforms = platforms.linux; + maintainers = [ maintainers.abbradar ]; + }; +} diff --git a/pkgs/desktops/xfce/default.nix b/pkgs/desktops/xfce/default.nix index 2d4ef5583480..3844633839ed 100644 --- a/pkgs/desktops/xfce/default.nix +++ b/pkgs/desktops/xfce/default.nix @@ -51,6 +51,10 @@ xfce_self = rec { # the lines are very long but it seems better than the even-od xfce4taskmanager= callPackage ./applications/xfce4-taskmanager.nix { }; xfce4terminal = callPackage ./applications/terminal.nix { }; xfce4screenshooter = callPackage ./applications/xfce4-screenshooter.nix { }; + xfce4volumed = let + gst = callPackage ./applications/xfce4-volumed.nix { }; + pulse = callPackage ./applications/xfce4-volumed-pulse.nix { }; + in if config.pulseaudio or false then pulse else gst; #### ART from "mirror://xfce/src/art/${p_name}/${ver_maj}/${name}.tar.bz2"