firefoxPackages: add a patch to fix pulseaudio initialization bug
This is optional (`libcardiacarrest` has a workaround for this bug because there's `firefox-bin` that I can't fix), but with this applied things are a bit smoother.
This commit is contained in:
parent
7cd02c8a4c
commit
23e2ea9cba
|
@ -0,0 +1,26 @@
|
|||
Yep, it's a "return code was ignored" bug.
|
||||
diff --git a/media/libcubeb/src/cubeb_pulse.c b/media/libcubeb/src/cubeb_pulse.c
|
||||
index aaaaaaaaaaa..bbbbbbbbbbb 100644
|
||||
--- a/media/libcubeb/src/cubeb_pulse.c
|
||||
+++ b/media/libcubeb/src/cubeb_pulse.c
|
||||
@@ -473,6 +473,8 @@
|
||||
static int
|
||||
pulse_context_init(cubeb * ctx)
|
||||
{
|
||||
+ int r;
|
||||
+
|
||||
if (ctx->context) {
|
||||
assert(ctx->error == 1);
|
||||
pulse_context_destroy(ctx);
|
||||
@@ -486,9 +488,9 @@
|
||||
WRAP(pa_context_set_state_callback)(ctx->context, context_state_callback, ctx);
|
||||
|
||||
WRAP(pa_threaded_mainloop_lock)(ctx->mainloop);
|
||||
- WRAP(pa_context_connect)(ctx->context, NULL, 0, NULL);
|
||||
+ r = WRAP(pa_context_connect)(ctx->context, NULL, 0, NULL);
|
||||
|
||||
- if (wait_until_context_ready(ctx) != 0) {
|
||||
+ if (r < 0 || wait_until_context_ready(ctx) != 0) {
|
||||
WRAP(pa_threaded_mainloop_unlock)(ctx->mainloop);
|
||||
pulse_context_destroy(ctx);
|
||||
ctx->context = NULL;
|
|
@ -1,6 +1,18 @@
|
|||
{ lib, callPackage, stdenv, overrideCC, gcc5, fetchurl, fetchFromGitHub, fetchpatch }:
|
||||
|
||||
let common = opts: callPackage (import ./common.nix opts); in
|
||||
let
|
||||
|
||||
common = opts: callPackage (import ./common.nix opts);
|
||||
|
||||
nixpkgsPatches = [
|
||||
./env_var_for_system_dir.patch
|
||||
|
||||
# this one is actually an omnipresent bug
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1444519
|
||||
./fix-pa-context-connect-retval.patch
|
||||
];
|
||||
|
||||
in
|
||||
|
||||
rec {
|
||||
|
||||
|
@ -12,9 +24,8 @@ rec {
|
|||
sha512 = "ff748780492fc66b3e44c7e7641f16206e4c09514224c62d37efac2c59877bdf428a3670bfb50407166d7b505d4e2ea020626fd776b87f6abb6bc5d2e54c773f";
|
||||
};
|
||||
|
||||
patches = [
|
||||
patches = nixpkgsPatches ++ [
|
||||
./no-buildconfig.patch
|
||||
./env_var_for_system_dir.patch
|
||||
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1430274
|
||||
# Scheduled for firefox 59
|
||||
|
@ -49,8 +60,7 @@ rec {
|
|||
sha512 = "cf583df34272b7ff8841c3b093ca0819118f9c36d23c6f9b3135db298e84ca022934bcd189add6473922b199b47330c0ecf14c303ab4177c03dbf26e64476fa4";
|
||||
};
|
||||
|
||||
patches =
|
||||
[ ./env_var_for_system_dir.patch ];
|
||||
patches = nixpkgsPatches;
|
||||
|
||||
meta = firefox.meta // {
|
||||
description = "A web browser built from Firefox Extended Support Release source tree";
|
||||
|
@ -127,8 +137,7 @@ in rec {
|
|||
sha256 = "169mjkr0bp80yv9nzza7kay7y2k03lpnx71h4ybcv9ygxgzdgax5";
|
||||
};
|
||||
|
||||
patches =
|
||||
[ ./env_var_for_system_dir.patch ];
|
||||
patches = nixpkgsPatches;
|
||||
} // commonAttrs) {};
|
||||
|
||||
tor-browser-7-5 = common (rec {
|
||||
|
@ -145,8 +154,7 @@ in rec {
|
|||
sha256 = "0llbk7skh1n7yj137gv7rnxfasxsnvfjp4ss7h1fbdnw19yba115";
|
||||
};
|
||||
|
||||
patches =
|
||||
[ ./env_var_for_system_dir.patch ];
|
||||
patches = nixpkgsPatches;
|
||||
} // commonAttrs) {};
|
||||
|
||||
tor-browser = tor-browser-7-5;
|
||||
|
|
Loading…
Reference in New Issue