@@ -18,20 +18,14 @@
1818, ffmpeg, libxslt, libxml2, at-spi2-core
1919, jre8
2020, pipewire_0_2
21+, libva
2122
2223# optional dependencies
2324, libgcrypt ? null # gnomeSupport || cupsSupport
24−, libva ? null # useVaapi
2525, libdrm ? null, wayland ? null, mesa ? null, libxkbcommon ? null # useOzone
2626
2727# package customization
28−, useOzone ? false
29−, useVaapi ? !(useOzone || stdenv.isAarch64) # Built if supported, but disabled in the wrapper
30−# VA-API TODOs:
31−# - Ozone: M81 fails to build due to "ozone_platform_gbm = false"
32−# - Possible solutions: Write a patch to fix the build (wrong gn dependencies)
33−# or build with minigbm
34−# - AArch64: Causes serious regressions (https://github.com/NixOS/nixpkgs/pull/85253#issuecomment-614405879)
28+, useOzone ? true
3529, gnomeSupport ? false, gnome ? null
3630, gnomeKeyringSupport ? false, libgnome-keyring3 ? null
3731, proprietaryCodecs ? true
@@ -148,8 +142,8 @@ let
148142 pciutils protobuf speechd libXdamage at-spi2-core
149143 jre
150144 pipewire_0_2
151− ] ++ optional useVaapi libva
152− ++ optional gnomeKeyringSupport libgnome-keyring3
145+ libva
146+ ] ++ optional gnomeKeyringSupport libgnome-keyring3
153147 ++ optionals gnomeSupport [ gnome.GConf libgcrypt ]
154148 ++ optionals cupsSupport [ libgcrypt cups ]
155149 ++ optional pulseSupport libpulseaudio
@@ -159,9 +153,6 @@ let
159153 ./patches/no-build-timestamps.patch # Optional patch to use SOURCE_DATE_EPOCH in compute_build_timestamp.py (should be upstreamed)
160154 ./patches/widevine-79.patch # For bundling Widevine (DRM), might be replaceable via bundle_widevine_cdm=true in gnFlags
161155 # ++ optional (versionRange "68" "72") ( githubPatch "<patch>" "0000000000000000000000000000000000000000000000000000000000000000" )
162− ] ++ optionals (useVaapi && versionRange "86" "87") [
163− # Check for enable-accelerated-video-decode on Linux:
164− (githubPatch "54deb9811ca9bd2327def5c05ba6987b8c7a0897" "11jvxjlkzz1hm0pvfyr88j7z3zbwzplyl5idkx92l2lzv4459c8d")
165156 ];
166157
167158 postPatch = ''
@@ -234,9 +225,8 @@ let
234225 custom_toolchain = "//build/toolchain/linux/unbundle:default";
235226 host_toolchain = "//build/toolchain/linux/unbundle:default";
236227 is_official_build = true;
237− is_debug = false;
238228
239− proprietary_codecs = false;
229+ use_vaapi = !stdenv.isAarch64; # TODO: Remove once M88 is released
240230 use_sysroot = false;
241231 use_gnome_keyring = gnomeKeyringSupport;
242232 use_gio = gnomeSupport;
@@ -252,7 +242,6 @@ let
252242 rtc_use_pipewire = true;
253243
254244 treat_warnings_as_errors = false;
255− is_clang = stdenv.cc.isClang;
256245 clang_use_chrome_plugins = false;
257246 blink_symbol_level = 0;
258247 symbol_level = 0;
@@ -270,14 +259,11 @@ let
270259 proprietary_codecs = true;
271260 enable_hangout_services_extension = true;
272261 ffmpeg_branding = "Chrome";
273− } // optionalAttrs useVaapi {
274− use_vaapi = true;
275262 } // optionalAttrs pulseSupport {
276263 use_pulseaudio = true;
277264 link_pulseaudio = true;
278265 } // optionalAttrs useOzone {
279266 use_ozone = true;
280− ozone_platform_gbm = false;
281267 use_xkbcommon = true;
282268 use_glib = true;
283269 use_gtk = true;
@@ -286,6 +272,7 @@ let
286272 use_system_libdrm = true;
287273 system_wayland_scanner_path = "${wayland}/bin/wayland-scanner";
288274 } // optionalAttrs ungoogled {
275+ chrome_pgo_phase = 0;
289276 enable_hangout_services_extension = false;
290277 enable_js_type_check = false;
291278 enable_mdns = false;