diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index 3a9e07187e2d..8d99fcc8abf6 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -160,9 +160,21 @@ let ./patches/no-build-timestamps.patch # For bundling Widevine (DRM), might be replaceable via bundle_widevine_cdm=true in gnFlags: ./patches/widevine-79.patch + ] ++ optionals (versionRange "102" "103") [ + # https://dawn-review.googlesource.com/c/dawn/+/88582 + # Wrap get_gitHash in try-catch to prevent failures in tarball builds. + ./patches/m102-fix-dawn_version_generator-failure.patch ]; - postPatch = '' + postPatch = optionalString (chromiumVersionAtLeast "102") '' + # Workaround/fix for https://bugs.chromium.org/p/chromium/issues/detail?id=1313361: + substituteInPlace BUILD.gn \ + --replace '"//infra/orchestrator:orchestrator_all",' "" + # Disable build flags that require LLVM 15: + substituteInPlace build/config/compiler/BUILD.gn \ + --replace '"-Xclang",' "" \ + --replace '"-no-opaque-pointers",' "" + '' + '' # remove unused third-party for lib in ${toString gnSystemLibraries}; do if [ -d "third_party/$lib" ]; then @@ -182,6 +194,7 @@ let --replace "/usr/bin/env -S make -f" "/usr/bin/make -f" fi chmod -x third_party/webgpu-cts/src/tools/run_deno + ${lib.optionalString (chromiumVersionAtLeast "102") "chmod -x third_party/dawn/third_party/webgpu-cts/tools/run_deno"} # We want to be able to specify where the sandbox is via CHROME_DEVEL_SANDBOX substituteInPlace sandbox/linux/suid/client/setuid_sandbox_host.cc \ diff --git a/pkgs/applications/networking/browsers/chromium/patches/m102-fix-dawn_version_generator-failure.patch b/pkgs/applications/networking/browsers/chromium/patches/m102-fix-dawn_version_generator-failure.patch new file mode 100644 index 000000000000..e9391541e435 --- /dev/null +++ b/pkgs/applications/networking/browsers/chromium/patches/m102-fix-dawn_version_generator-failure.patch @@ -0,0 +1,43 @@ +From e9ffd084ec1ff9f7bfc86879732953dc58256958 Mon Sep 17 00:00:00 2001 +From: Loko Kung +Date: Tue, 3 May 2022 00:28:53 +0000 +Subject: [PATCH] Wrap get_gitHash in try-catch to prevent failures in tarball + builds. + +Bug: chromium:1321370 +Change-Id: If39d2236d1b4d965f7bd189f6bd1cdc70436c41d +Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88582 +Commit-Queue: Loko Kung +Reviewed-by: Austin Eng +Kokoro: Kokoro +(cherry picked from commit 03ddfbb81fb4127ca37ea53e70fcb34fe851e24e) +--- + third_party/dawn/generator/dawn_version_generator.py | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +diff --git a/third_party/dawn/generator/dawn_version_generator.py b/third_party/dawn/generator/dawn_version_generator.py +index 1907e88da..3c1927bee 100644 +--- a/third_party/dawn/generator/dawn_version_generator.py ++++ b/third_party/dawn/generator/dawn_version_generator.py +@@ -23,11 +23,14 @@ def get_git(): + + + def get_gitHash(dawnDir): +- result = subprocess.run([get_git(), 'rev-parse', 'HEAD'], +- stdout=subprocess.PIPE, +- cwd=dawnDir) +- if result.returncode == 0: +- return result.stdout.decode('utf-8').strip() ++ try: ++ result = subprocess.run([get_git(), "rev-parse", "HEAD"], ++ stdout=subprocess.PIPE, ++ cwd=dawnDir) ++ if result.returncode == 0: ++ return result.stdout.decode("utf-8").strip() ++ except Exception: ++ return "" + # No hash was available (possibly) because the directory was not a git checkout. Dawn should + # explicitly handle its absenece and disable features relying on the hash, i.e. caching. + return '' +-- +2.36.0 diff --git a/pkgs/applications/networking/browsers/chromium/upstream-info.json b/pkgs/applications/networking/browsers/chromium/upstream-info.json index 1c059346aafe..031439f75d23 100644 --- a/pkgs/applications/networking/browsers/chromium/upstream-info.json +++ b/pkgs/applications/networking/browsers/chromium/upstream-info.json @@ -19,22 +19,9 @@ } }, "beta": { - "version": "101.0.4951.41", - "sha256": "0dzsbr309n70jg7fpq2qfnrgcm4553akvdmnzhss1fc85s467609", - "sha256bin64": "1jbj5cykxamf32c1s4gsid1wxcsdf4hng2d19q9h7b2ashkvvrbi", - "deps": { - "gn": { - "version": "2022-03-14", - "url": "https://gn.googlesource.com/gn", - "rev": "bd99dbf98cbdefe18a4128189665c5761263bcfb", - "sha256": "0nql15ckjqkm001xajq3qyn4h4q80i7x6dm9zinxxr1a8q5lppx3" - } - } - }, - "dev": { - "version": "102.0.5005.12", - "sha256": "11n03hz3g8h7srywxrjwrdrxybdjvmdjrnigjlrwjkydprg1l7ab", - "sha256bin64": "0hc56a98ikkbgdw36dpz9k6r15jmjmnm7faml8z59vixxlvkrw7y", + "version": "102.0.5005.49", + "sha256": "16r9mrsagy8lspr4pcrzfpw0vw0ym9m7n41a9yipjhm2arlhw5b2", + "sha256bin64": "0lyk6rd9c1gyvxsmq1bl7asr7carzyaan306ddvwxsy5rfh53jxa", "deps": { "gn": { "version": "2022-04-14", @@ -44,6 +31,19 @@ } } }, + "dev": { + "version": "103.0.5056.0", + "sha256": "1mvi7yc38cxn39wqm8ybrn862gaw293rb6lwcszc6rmzwd9jmd29", + "sha256bin64": "06371adaz8llzfjykc72vjvpy3xrgvqzz9kdrr82jdx1pjdbv29d", + "deps": { + "gn": { + "version": "2022-05-09", + "url": "https://gn.googlesource.com/gn", + "rev": "bf4e17dc67b2a2007475415e3f9e1d1cf32f6e35", + "sha256": "0d2lb4alsx32zsdw3jxpxbzal350mim237p2y984h4r6fd1ddzyi" + } + } + }, "ungoogled-chromium": { "version": "101.0.4951.64", "sha256": "1xyqm32y9v1hn8ji6qfw6maynqgg3266j58dq4x4aqsm2gj9cn4w", diff --git a/pkgs/applications/networking/browsers/google-chrome/default.nix b/pkgs/applications/networking/browsers/google-chrome/default.nix index 39e9f1cb443c..bb9976e63e32 100644 --- a/pkgs/applications/networking/browsers/google-chrome/default.nix +++ b/pkgs/applications/networking/browsers/google-chrome/default.nix @@ -32,7 +32,7 @@ , channel ? "stable" # Necessary for USB audio devices. -, pulseSupport ? true, libpulseaudio ? null +, pulseSupport ? true, libpulseaudio # Only needed for getting information about upstream binaries , chromium