Skip to content

Commit

Permalink
chromium: Add support for pulseaudio.
Browse files Browse the repository at this point in the history
Which is enabled by default if neither pulseaudio or chromium.pulseaudio is
explicitly set. The reason is that chromium falls back to ALSA in case no
pulseaudio is available.

In addition it was necessary to patch media.gyp to ignore the array-out-of-
bounds warning.
  • Loading branch information
aszlig authored and edolstra committed Jun 22, 2012
1 parent a2984e3 commit 59f8de8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pkgs/applications/networking/browsers/chromium/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
, gconf # config.gnome
, libgcrypt # config.gnome || config.cups
, nss, openssl # config.openssl
, pulseaudio # config.pulseaudio
, libselinux # config.selinux
}:

Expand All @@ -32,6 +33,7 @@ let
gnomeKeyring = false;
proprietaryCodecs = true;
cups = false;
pulseaudio = getConfig ["pulseaudio"] true;
};

sourceInfo = import ./source.nix;
Expand Down Expand Up @@ -98,14 +100,16 @@ in stdenv.mkDerivation rec {
] ++ stdenv.lib.optional config.gnomeKeyring libgnome_keyring
++ stdenv.lib.optionals config.gnome [ gconf libgcrypt ]
++ stdenv.lib.optional config.selinux libselinux
++ stdenv.lib.optional config.cups libgcrypt;
++ stdenv.lib.optional config.cups libgcrypt
++ stdenv.lib.optional config.pulseaudio pulseaudio;

opensslPatches = stdenv.lib.optional config.openssl openssl.patches;

prePatch = "patchShebangs .";

patches = stdenv.lib.optional (!config.selinux) ./enable_seccomp.patch
++ stdenv.lib.optional config.cups ./cups_allow_deprecated.patch;
++ stdenv.lib.optional config.cups ./cups_allow_deprecated.patch
++ stdenv.lib.optional config.pulseaudio ./pulseaudio_array_bounds.patch;

postPatch = stdenv.lib.optionalString config.openssl ''
cat $opensslPatches | patch -p1 -d third_party/openssl/openssl
Expand All @@ -118,6 +122,7 @@ in stdenv.mkDerivation rec {
use_gnome_keyring = config.gnomeKeyring;
use_gconf = config.gnome;
use_gio = config.gnome;
use_pulseaudio = config.pulseaudio;
disable_nacl = !config.nacl;
use_openssl = config.openssl;
selinux = config.selinux;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/media/media.gyp b/media/media.gyp
index 2a8c6c6..66ca767 100644
--- a/media/media.gyp
+++ b/media/media.gyp
@@ -399,6 +399,7 @@
['use_pulseaudio == 1', {
'cflags': [
'<!@(pkg-config --cflags libpulse)',
+ '-Wno-array-bounds',
],
'link_settings': {
'libraries': [

0 comments on commit 59f8de8

Please sign in to comment.