tor-browser: add support for GPU acceleration
Support GPU acceleration for WebRender & VA-API.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user