Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 38 additions & 4 deletions pkgs/applications/networking/browsers/chromium/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,11 @@ let
./patches/cross-compile.patch
# Optional patch to use SOURCE_DATE_EPOCH in compute_build_timestamp.py (should be upstreamed):
./patches/no-build-timestamps.patch
]
++ lib.optionals (!chromiumVersionAtLeast "136") [
# Fix build with Pipewire 1.4
# Submitted upstream: https://webrtc-review.googlesource.com/c/src/+/380500
# Got merged, started shipping with M136+.
./patches/webrtc-pipewire-1.4.patch
]
++ lib.optionals (packageName == "chromium") [
Expand Down Expand Up @@ -487,7 +490,12 @@ let
# allowing us to use our rustc and our clang.
./patches/chromium-129-rust.patch
]
++ lib.optionals (!ungoogled) [
++ lib.optionals (!ungoogled && !chromiumVersionAtLeast "136") [
# Note: We since use LLVM v19.1+ on unstable *and* release-24.11 for all version and as such
# no longer need this patch. We opt to arbitrarily limit it to versions prior to M136 just
# because that's when this revert stopped applying cleanly and defer fully dropping it for
# the next cleanup to bundle rebuilding all of chromium and electron.
#
# Our rustc.llvmPackages is too old for std::hardware_destructive_interference_size
# and std::hardware_constructive_interference_size.
# So let's revert the change for now and hope that our rustc.llvmPackages and
Expand Down Expand Up @@ -535,9 +543,10 @@ let
hash = "sha256-xMqGdu5Q8BGF/OIRdmMzPrrrMGDOSY2xElFfhRsJlDU=";
})
]
++ lib.optionals (!isElectron) [
++ lib.optionals (!isElectron && !chromiumVersionAtLeast "136") [
# Backport "Only call format_message when needed" to fix print() crashing with is_cfi = true.
# We build electron is_cfi = false and as such electron is not affected by this.
# Started shipping with M136+.
# https://github.com/NixOS/nixpkgs/issues/401326
# https://gitlab.archlinux.org/archlinux/packaging/packages/chromium/-/issues/13
# https://skia-review.googlesource.com/c/skia/+/961356
Expand All @@ -549,11 +558,32 @@ let
extraPrefix = "third_party/skia/";
hash = "sha256-aMqDjt/0cowqSm5DqcD3+zX+mtjydk396LD+B5F/3cs=";
})
]
++ lib.optionals (chromiumVersionAtLeast "136") [
# Modify the nodejs version check added in https://chromium-review.googlesource.com/c/chromium/src/+/6334038
# to look for the minimal version, not the exact version (major.minor.patch). The linked CL makes a case for
# preventing compilations of chromium with versions below their intended version, not about running the very
# exact version or even running a newer version.
./patches/chromium-136-nodejs-assert-minimal-version-instead-of-exact-match.patch
];

postPatch =
lib.optionalString (!isElectron) ''
ln -s ${./files/gclient_args.gni} build/config/gclient_args.gni
lib.optionalString (!isElectron)
# TODO: reuse mkGnFlags for this
(
if (chromiumVersionAtLeast "136") then
''
cp ${./files/gclient_args.gni} build/config/gclient_args.gni
chmod u+w build/config/gclient_args.gni
echo 'checkout_mutter = false' >> build/config/gclient_args.gni
echo 'checkout_glic_e2e_tests = false' >> build/config/gclient_args.gni
''
else
''
ln -s ${./files/gclient_args.gni} build/config/gclient_args.gni
''
)
+ lib.optionalString (!isElectron) ''

echo 'LASTCHANGE=${upstream-info.DEPS."src".rev}-refs/tags/${version}@{#0}' > build/util/LASTCHANGE
echo "$SOURCE_DATE_EPOCH" > build/util/LASTCHANGE.committime
Expand Down Expand Up @@ -766,6 +796,10 @@ let
use_qt = false;
}
)
// lib.optionalAttrs (chromiumVersionAtLeast "136") {
# LLVM < v21 does not support --warning-suppression-mappings yet:
clang_warning_suppression_file = "";
}
// {
# To fix the build as we don't provide libffi_pic.a
# (ld.lld: error: unable to find library -l:libffi_pic.a):
Expand Down
Loading
Loading