From cc145f2ae91d8c3fa304853cdcfbbe2347085cf9 Mon Sep 17 00:00:00 2001 From: Arie Middelkoop Date: Wed, 1 Feb 2012 22:09:35 +0000 Subject: [PATCH] Update of skype expression: make the use of pulse audio optional based on the configuration setting for pulse audio (off by default). Removing pulse audio from the build inputs when it is not used prevents the bug of Skype taking 100% cpu from showing up. This demonstrates nicely nix' features: in other distributions the recomended solution was to remove read permission from the pulse audio libs. svn path=/nixpkgs/trunk/; revision=31959 --- pkgs/applications/networking/skype/default.nix | 6 +++--- pkgs/top-level/all-packages.nix | 11 ++++++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/networking/skype/default.nix b/pkgs/applications/networking/skype/default.nix index 8d3645e38195..45e225496ebb 100644 --- a/pkgs/applications/networking/skype/default.nix +++ b/pkgs/applications/networking/skype/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, alsaLib, libXv, libXi, libXrender, libXrandr, zlib, glib , libXext, libX11, libXScrnSaver, libSM, qt4, libICE, freetype, fontconfig -, pulseaudio }: +, pulseaudio, usePulseAudio, lib }: assert stdenv.system == "i686-linux"; @@ -12,9 +12,9 @@ stdenv.mkDerivation rec { sha256 = "157ba3ci12bq0nv2m8wlsab45ib5sccqagyna8nixnhqw9q72sxm"; }; - buildInputs = [ + buildInputs = + lib.optional usePulseAudio pulseaudio ++ [ alsaLib - pulseaudio stdenv.glibc stdenv.gcc.gcc libXv diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7281b659ce22..c949a1de3fc7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -313,6 +313,11 @@ let inherit stdenv; }; + makeAutostartItem = import ../build-support/make-startupitem { + inherit stdenv; + inherit lib; + }; + makeInitrd = {contents}: import ../build-support/kernel/make-initrd.nix { inherit stdenv perl cpio contents ubootChooser; }; @@ -5256,6 +5261,8 @@ let alsaUtils = callPackage ../os-specific/linux/alsa-utils { }; + microcodeIntel = callPackage ../os-specific/linux/microcode/intel.nix { }; + bcm43xx = callPackage ../os-specific/linux/firmware/bcm43xx { }; bluez = callPackage ../os-specific/linux/bluez { }; @@ -7477,7 +7484,9 @@ let siproxd = callPackage ../applications/networking/siproxd { }; - skype_linux = callPackage_i686 ../applications/networking/skype { }; + skype_linux = callPackage_i686 ../applications/networking/skype { + usePulseAudio = getConfig [ "pulseaudio" ] false; # disabled by default (the 100% cpu bug) + }; slim = callPackage ../applications/display-managers/slim { };