diff options
author | Felix Schröter <dev@felschr.com> | 2023-11-12 18:54:09 +0100 |
---|---|---|
committer | Felix Schröter <dev@felschr.com> | 2023-11-12 19:04:26 +0100 |
commit | 4fd012bae7c5060dd44dc242d2c47adc454df613 (patch) | |
tree | a649fa8a269198c625b7dcd793d6d0690a41ae05 /pkgs/applications/networking | |
parent | 498c76e2b271632f9cfbac8fcf6a85b319042453 (diff) |
tor-browser: add support for GPU acceleration
Support GPU acceleration for WebRender & VA-API.
Diffstat (limited to 'pkgs/applications/networking')
-rw-r--r-- | pkgs/applications/networking/browsers/tor-browser/default.nix | 91 |
1 files changed, 59 insertions, 32 deletions
diff --git a/pkgs/applications/networking/browsers/tor-browser/default.nix b/pkgs/applications/networking/browsers/tor-browser/default.nix index caa4b6e39a591..6b155977a3b87 100644 --- a/pkgs/applications/networking/browsers/tor-browser/default.nix +++ b/pkgs/applications/networking/browsers/tor-browser/default.nix @@ -2,12 +2,9 @@ , fetchurl , makeDesktopItem , writeText +, autoPatchelfHook , callPackage -# Common run-time dependencies -, zlib - -# libxul run-time dependencies , atk , cairo , dbus @@ -22,14 +19,32 @@ , libXext , libXrender , libXt +, libXtst +, mesa , pango +, pciutils +, zlib + +, libnotifySupport ? stdenv.isLinux +, libnotify + +, waylandSupport ? stdenv.isLinux +, libxkbcommon +, libdrm , audioSupport ? mediaSupport -, pulseaudioSupport ? mediaSupport + +, pipewireSupport ? audioSupport +, pipewire + +, pulseaudioSupport ? audioSupport , libpulseaudio , apulse , alsa-lib +, libvaSupport ? mediaSupport +, libva + # Media support (implies audio support) , mediaSupport ? true , ffmpeg @@ -58,33 +73,37 @@ lib.warnIf (useHardenedMalloc != null) "tor-browser: useHardenedMalloc is deprecated and enabling it can cause issues" (let - libPath = lib.makeLibraryPath libPkgs; - - libPkgs = [ - alsa-lib - atk - cairo - dbus - dbus-glib - fontconfig - freetype - gdk-pixbuf - glib - gtk3 - libxcb - libX11 - libXext - libXrender - libXt - pango - stdenv.cc.cc - stdenv.cc.libc - zlib - ] - ++ lib.optionals pulseaudioSupport [ libpulseaudio ] - ++ lib.optionals mediaSupport [ - ffmpeg - ]; + libPath = lib.makeLibraryPath ( + [ + alsa-lib + atk + cairo + dbus + dbus-glib + fontconfig + freetype + gdk-pixbuf + glib + gtk3 + libxcb + libX11 + libXext + libXrender + libXt + libXtst + mesa # for libgbm + pango + pciutils + stdenv.cc.cc + 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 ] + ); version = "13.0.1"; @@ -129,6 +148,14 @@ stdenv.mkDerivation rec { src = sources.${stdenv.hostPlatform.system} or (throw "unsupported system: ${stdenv.hostPlatform.system}"); + nativeBuildInputs = [ autoPatchelfHook ]; + buildInputs = [ + gtk3 + alsa-lib + dbus-glib + libXtst + ]; + preferLocalBuild = true; allowSubstitutes = false; |