tor-browser: add support for GPU acceleration

Support GPU acceleration for WebRender & VA-API.

+59 -32
+59 -32
pkgs/applications/networking/browsers/tor-browser/default.nix
··· 2 , fetchurl 3 , makeDesktopItem 4 , writeText 5 , callPackage 6 7 - # Common run-time dependencies 8 - , zlib 9 - 10 - # libxul run-time dependencies 11 , atk 12 , cairo 13 , dbus ··· 22 , libXext 23 , libXrender 24 , libXt 25 , pango 26 27 , audioSupport ? mediaSupport 28 - , pulseaudioSupport ? mediaSupport 29 , libpulseaudio 30 , apulse 31 , alsa-lib 32 33 # Media support (implies audio support) 34 , mediaSupport ? true 35 , ffmpeg ··· 58 "tor-browser: useHardenedMalloc is deprecated and enabling it can cause issues" 59 60 (let 61 - libPath = lib.makeLibraryPath libPkgs; 62 - 63 - libPkgs = [ 64 - alsa-lib 65 - atk 66 - cairo 67 - dbus 68 - dbus-glib 69 - fontconfig 70 - freetype 71 - gdk-pixbuf 72 - glib 73 - gtk3 74 - libxcb 75 - libX11 76 - libXext 77 - libXrender 78 - libXt 79 - pango 80 - stdenv.cc.cc 81 - stdenv.cc.libc 82 - zlib 83 - ] 84 - ++ lib.optionals pulseaudioSupport [ libpulseaudio ] 85 - ++ lib.optionals mediaSupport [ 86 - ffmpeg 87 - ]; 88 89 version = "13.0.1"; 90 ··· 128 inherit version; 129 130 src = sources.${stdenv.hostPlatform.system} or (throw "unsupported system: ${stdenv.hostPlatform.system}"); 131 132 preferLocalBuild = true; 133 allowSubstitutes = false;
··· 2 , fetchurl 3 , makeDesktopItem 4 , writeText 5 + , autoPatchelfHook 6 , callPackage 7 8 , atk 9 , cairo 10 , dbus ··· 19 , libXext 20 , libXrender 21 , libXt 22 + , libXtst 23 + , mesa 24 , pango 25 + , pciutils 26 + , zlib 27 + 28 + , libnotifySupport ? stdenv.isLinux 29 + , libnotify 30 + 31 + , waylandSupport ? stdenv.isLinux 32 + , libxkbcommon 33 + , libdrm 34 35 , audioSupport ? mediaSupport 36 + 37 + , pipewireSupport ? audioSupport 38 + , pipewire 39 + 40 + , pulseaudioSupport ? audioSupport 41 , libpulseaudio 42 , apulse 43 , alsa-lib 44 45 + , libvaSupport ? mediaSupport 46 + , libva 47 + 48 # Media support (implies audio support) 49 , mediaSupport ? true 50 , ffmpeg ··· 73 "tor-browser: useHardenedMalloc is deprecated and enabling it can cause issues" 74 75 (let 76 + libPath = lib.makeLibraryPath ( 77 + [ 78 + alsa-lib 79 + atk 80 + cairo 81 + dbus 82 + dbus-glib 83 + fontconfig 84 + freetype 85 + gdk-pixbuf 86 + glib 87 + gtk3 88 + libxcb 89 + libX11 90 + libXext 91 + libXrender 92 + libXt 93 + libXtst 94 + mesa # for libgbm 95 + pango 96 + pciutils 97 + stdenv.cc.cc 98 + stdenv.cc.libc 99 + zlib 100 + ] ++ lib.optionals libnotifySupport [ libnotify ] 101 + ++ lib.optionals waylandSupport [ libxkbcommon libdrm ] 102 + ++ lib.optionals pipewireSupport [ pipewire ] 103 + ++ lib.optionals pulseaudioSupport [ libpulseaudio ] 104 + ++ lib.optionals libvaSupport [ libva ] 105 + ++ lib.optionals mediaSupport [ ffmpeg ] 106 + ); 107 108 version = "13.0.1"; 109 ··· 147 inherit version; 148 149 src = sources.${stdenv.hostPlatform.system} or (throw "unsupported system: ${stdenv.hostPlatform.system}"); 150 + 151 + nativeBuildInputs = [ autoPatchelfHook ]; 152 + buildInputs = [ 153 + gtk3 154 + alsa-lib 155 + dbus-glib 156 + libXtst 157 + ]; 158 159 preferLocalBuild = true; 160 allowSubstitutes = false;