From 6ada0c948b666b1a79ae00a98bdb255a89ea96aa Mon Sep 17 00:00:00 2001 From: emilylange Date: Thu, 20 Aug 2026 17:42:51 +0200 Subject: [PATCH] chromium: don't show misleading Terms of Service dialog on first run This new dialog was introduced by upstream in [CL 8257374] and slipped through our testing in [1]. It also managed to break our nixosTests.chromium VM test. We could just make our VM test use --no-first-run and have it pass that way, but the [dialog text] is actively misleading. [1]: de3a505f98e54be724a95d72a34c8a4c7304c15e [CL 8257374]: https://chromium-review.googlesource.com/c/chromium/src/+/8257374i [dialog text]: https://chromium.googlesource.com/chromium/src/+/151.0.7922.169/components/resources/terms/terms_chromium.txt (cherry picked from commit f9f52c783c7b0d5afbc60f26d8d29a6b7abb62f9) --- .../networking/browsers/chromium/common.nix | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index 32c86a4a8420..de5538393e43 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -653,6 +653,28 @@ let # which is annoying, so let's make it use Go from $PATH for # both (all) architectures instead. ./patches/chromium-151-dawn-use-Go-from-PATH.patch + ] + ++ lib.optionals (chromiumVersionAtLeast "151.0.7922.169" && !ungoogled) [ + # Don't show misleading Terms of Service dialog on first run that literally says [^1] + # + # > This Space Intentionally Blank + # > + # > In official builds this space will show the terms of service. + # + # "official builds" refers to offical Google Chrome builds, not Chromium, for which we + # explicitly set is_official_build=true as gn flag. If this does ever change to something + # actually worthwhile, we can drop this revert and update our VM test to handle this dialog. + # Exclude ungoogled-chromium, as it ships its own variant of this patch. + # [^1]: https://chromium.googlesource.com/chromium/src/+/151.0.7922.169/components/resources/terms/terms_chromium.txt + (fetchpatch { + name = "chromium-151-revert-Show-Linux-first-run-terms-of-service-dialog-by-default.patch"; + # https://chromium-review.googlesource.com/c/chromium/src/+/8257374 + url = "https://chromium.googlesource.com/chromium/src/+/ae9b17ac975d4b10af762e9344083d858f1347ce^!?format=TEXT"; + decode = "base64 -d"; + revert = true; + includes = [ "chrome/browser/first_run/first_run.h" ]; + hash = "sha256-d1Zm2flZPG++ROF4CCawn9U8T7/qgZFMHTXArqIShTk="; + }) ]; postPatch =