From e4dcdb133a290b11537a1ef6af4fde0b76cf8807 Mon Sep 17 00:00:00 2001 From: László Vaskó <1771332+vlaci@users.noreply.github.com> Date: Fri, 4 Aug 2023 13:56:39 +0200 Subject: qtwebengine: link to pulseaudio Nix builds of QTWebEngine doesn't support sound output via Pulse, only through ALSA, unless sandboxing is disabled and LD_LIBRARY_PATH contains a reference to the Pulse libraries. By default, Chromium won't link to PulseAudio, but dlopens it in run-time. It is tricky to make this work because of the nontrivial sandbox configuration. Nix builds of Chromium already link against Pulse directly, so it makes sense to copy this behavior in QTWebEngine. --- pkgs/development/libraries/qt-5/5.15/default.nix | 1 + .../libraries/qt-5/5.15/qtwebengine-link-pulseaudio.patch | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 pkgs/development/libraries/qt-5/5.15/qtwebengine-link-pulseaudio.patch (limited to 'pkgs/development/libraries/qt-5/5.15') diff --git a/pkgs/development/libraries/qt-5/5.15/default.nix b/pkgs/development/libraries/qt-5/5.15/default.nix index 5f82900903835..2dc8dcd839e7f 100644 --- a/pkgs/development/libraries/qt-5/5.15/default.nix +++ b/pkgs/development/libraries/qt-5/5.15/default.nix @@ -170,6 +170,7 @@ let extraPrefix = "src/3rdparty/"; hash = "sha256-s4GsGMJTBNWw2gTJuIEP3tqT82AmTsR2mbj59m2p6rM="; }) + ./qtwebengine-link-pulseaudio.patch ] ++ lib.optionals stdenv.isDarwin [ ./qtwebengine-darwin-no-platform-check.patch ./qtwebengine-mac-dont-set-dsymutil-path.patch diff --git a/pkgs/development/libraries/qt-5/5.15/qtwebengine-link-pulseaudio.patch b/pkgs/development/libraries/qt-5/5.15/qtwebengine-link-pulseaudio.patch new file mode 100644 index 0000000000000..052ec89dbc177 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/qtwebengine-link-pulseaudio.patch @@ -0,0 +1,8 @@ +--- a/src/core/config/common.pri ++++ b/src/core/config/common.pri +@@ -47,3 +47,5 @@ + + !qtConfig(webengine-nodejs10): gn_args += use_rollup=false + gn_args += enable_ipc_logging=false ++ ++gn_args += link_pulseaudio=true -- cgit 1.4.1