|
|
@ -49,6 +49,9 @@ |
|
|
|
, pulseSupport ? stdenv.isLinux |
|
|
|
, pulseSupport ? stdenv.isLinux |
|
|
|
, libpulseaudio |
|
|
|
, libpulseaudio |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# For GPU acceleration support on Wayland (without the lib it doesn't seem to work) |
|
|
|
|
|
|
|
, libGL |
|
|
|
|
|
|
|
|
|
|
|
# For video acceleration via VA-API (--enable-features=VaapiVideoDecoder,VaapiVideoEncoder) |
|
|
|
# For video acceleration via VA-API (--enable-features=VaapiVideoDecoder,VaapiVideoEncoder) |
|
|
|
, libvaSupport ? stdenv.isLinux |
|
|
|
, libvaSupport ? stdenv.isLinux |
|
|
|
, libva |
|
|
|
, libva |
|
|
@ -66,7 +69,7 @@ let |
|
|
|
|
|
|
|
|
|
|
|
deps = [ |
|
|
|
deps = [ |
|
|
|
alsa-lib at-spi2-atk at-spi2-core atk cairo cups dbus expat |
|
|
|
alsa-lib at-spi2-atk at-spi2-core atk cairo cups dbus expat |
|
|
|
fontconfig freetype gdk-pixbuf glib gtk3 libdrm libX11 |
|
|
|
fontconfig freetype gdk-pixbuf glib gtk3 libdrm libX11 libGL |
|
|
|
libxkbcommon libXScrnSaver libXcomposite libXcursor libXdamage |
|
|
|
libxkbcommon libXScrnSaver libXcomposite libXcursor libXdamage |
|
|
|
libXext libXfixes libXi libXrandr libXrender libxshmfence |
|
|
|
libXext libXfixes libXi libXrandr libXrender libxshmfence |
|
|
|
libXtst libuuid mesa nspr nss pango pipewire udev wayland |
|
|
|
libXtst libuuid mesa nspr nss pango pipewire udev wayland |
|
|
@ -128,9 +131,9 @@ stdenv.mkDerivation rec { |
|
|
|
ln -sf $BINARYWRAPPER $out/bin/brave |
|
|
|
ln -sf $BINARYWRAPPER $out/bin/brave |
|
|
|
|
|
|
|
|
|
|
|
for exe in $out/opt/brave.com/brave/{brave,chrome_crashpad_handler}; do |
|
|
|
for exe in $out/opt/brave.com/brave/{brave,chrome_crashpad_handler}; do |
|
|
|
patchelf \ |
|
|
|
patchelf \ |
|
|
|
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ |
|
|
|
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ |
|
|
|
--set-rpath "${rpath}" $exe |
|
|
|
--set-rpath "${rpath}" $exe |
|
|
|
done |
|
|
|
done |
|
|
|
|
|
|
|
|
|
|
|
# Fix paths |
|
|
|
# Fix paths |
|
|
@ -170,10 +173,10 @@ stdenv.mkDerivation rec { |
|
|
|
${optionalString (disableFeatures != []) '' |
|
|
|
${optionalString (disableFeatures != []) '' |
|
|
|
--add-flags "--disable-features=${strings.concatStringsSep "," disableFeatures}" |
|
|
|
--add-flags "--disable-features=${strings.concatStringsSep "," disableFeatures}" |
|
|
|
''} |
|
|
|
''} |
|
|
|
--add-flags ${escapeShellArg commandLineArgs} |
|
|
|
|
|
|
|
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland}}" |
|
|
|
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland}}" |
|
|
|
${optionalString vulkanSupport '' |
|
|
|
${optionalString vulkanSupport '' |
|
|
|
--prefix XDG_DATA_DIRS : "${addOpenGLRunpath.driverLink}/share" |
|
|
|
--prefix XDG_DATA_DIRS : "${addOpenGLRunpath.driverLink}/share" |
|
|
|
|
|
|
|
--add-flags ${escapeShellArg commandLineArgs} |
|
|
|
''} |
|
|
|
''} |
|
|
|
) |
|
|
|
) |
|
|
|
''; |
|
|
|
''; |
|
|
|