mullvad-browser: add support for GPU acceleration

Support GPU acceleration for WebRender & VA-API.
This commit is contained in:
Felix Schröter
2023-11-12 19:24:15 +01:00
parent 4fd012bae7
commit 039308e979
@@ -6,12 +6,9 @@
, makeWrapper
, writeText
, wrapGAppsHook
, autoPatchelfHook
, callPackage
# Common run-time dependencies
, zlib
# libxul run-time dependencies
, atk
, cairo
, dbus
@@ -30,19 +27,30 @@
, mesa
, pango
, pciutils
, zlib
, libnotifySupport ? stdenv.isLinux
, libnotify
, waylandSupport ? stdenv.isLinux
, libxkbcommon
, libdrm
, mediaSupport ? true
, ffmpeg
, audioSupport ? mediaSupport
, pulseaudioSupport ? mediaSupport
, pipewireSupport ? audioSupport
, pipewire
, pulseaudioSupport ? audioSupport
, libpulseaudio
, apulse
, alsa-lib
# Media support (implies audio support)
, mediaSupport ? true
, ffmpeg
, libvaSupport ? mediaSupport
, libva
# Extra preferences
, extraPrefs ? ""
@@ -74,7 +82,10 @@ let
stdenv.cc.libc
zlib
] ++ lib.optionals libnotifySupport [ libnotify ]
++ lib.optionals waylandSupport [ libxkbcommon libdrm ]
++ lib.optionals pipewireSupport [ pipewire ]
++ lib.optionals pulseaudioSupport [ libpulseaudio ]
++ lib.optionals libvaSupport [ libva ]
++ lib.optionals mediaSupport [ ffmpeg ]
);
@@ -113,7 +124,13 @@ stdenv.mkDerivation rec {
src = sources.${stdenv.hostPlatform.system} or (throw "unsupported system: ${stdenv.hostPlatform.system}");
nativeBuildInputs = [ copyDesktopItems makeWrapper wrapGAppsHook ];
nativeBuildInputs = [ copyDesktopItems makeWrapper wrapGAppsHook autoPatchelfHook ];
buildInputs = [
gtk3
alsa-lib
dbus-glib
libXtst
];
preferLocalBuild = true;
allowSubstitutes = false;