diff options
| author | emilylange <git@emilylange.de> | 2024-07-25 01:53:53 +0200 |
|---|---|---|
| committer | emilylange <git@emilylange.de> | 2024-07-27 16:40:58 +0200 |
| commit | 3d7c8f701b6c78dedc448bc030b6fbbbeae4b275 (patch) | |
| tree | dd10b20ef1e0d46b0192181266d0c793ff95ec8e | |
| parent | chromium: fix `update.py` python3.12 compat (diff) | |
| download | nixpkgs-3d7c8f701b6c78dedc448bc030b6fbbbeae4b275.tar.gz | |
chromium: prepare for M127
(cherry picked from commit b80f73df94770c316b206ac221215b464377c3ee)
3 files changed, 17 insertions, 3 deletions
diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index a5560acd8ad8..9854a0cf5bd4 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -373,7 +373,7 @@ let patchShebangs . # Link to our own Node.js and Java (required during the build): mkdir -p third_party/node/linux/node-linux-x64/bin - ln -s "${pkgsBuildHost.nodejs}/bin/node" third_party/node/linux/node-linux-x64/bin/node + ln -s${lib.optionalString (chromiumVersionAtLeast "127") "f"} "${pkgsBuildHost.nodejs}/bin/node" third_party/node/linux/node-linux-x64/bin/node ln -s "${pkgsBuildHost.jdk17_headless}/bin/java" third_party/jdk/current/bin/ # Allow building against system libraries in official builds @@ -478,6 +478,8 @@ let # While we technically don't need the cache-invalidation rustc_version provides, rustc_version # is still used in some scripts (e.g. build/rust/std/find_std_rlibs.py). rustc_version = buildPackages.rustc.version; + } // lib.optionalAttrs (chromiumVersionAtLeast "127") { + rust_bindgen_root = "${buildPackages.rust-bindgen}"; } // lib.optionalAttrs (!(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) { # https://www.mail-archive.com/v8-users@googlegroups.com/msg14528.html arm_control_flow_integrity = "none"; diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix index afd25b972d78..29515ce7150e 100644 --- a/pkgs/applications/networking/browsers/chromium/default.nix +++ b/pkgs/applications/networking/browsers/chromium/default.nix @@ -59,8 +59,12 @@ let src = fetchgit { inherit (upstream-info.deps.gn) url rev hash; }; + } // lib.optionalAttrs (chromiumVersionAtLeast "127") { + # Relax hardening as otherwise gn unstable 2024-06-06 and later fail with: + # cc1plus: error: '-Wformat-security' ignored without '-Wformat' [-Werror=format-security] + hardeningDisable = [ "format" ]; }); - recompressTarball = callPackage ./recompress-tarball.nix { }; + recompressTarball = callPackage ./recompress-tarball.nix { inherit chromiumVersionAtLeast; }; }); browser = callPackage ./browser.nix { diff --git a/pkgs/applications/networking/browsers/chromium/recompress-tarball.nix b/pkgs/applications/networking/browsers/chromium/recompress-tarball.nix index e663c393d8dc..ab1c81338f97 100644 --- a/pkgs/applications/networking/browsers/chromium/recompress-tarball.nix +++ b/pkgs/applications/networking/browsers/chromium/recompress-tarball.nix @@ -1,10 +1,11 @@ { zstd , fetchurl +, lib +, chromiumVersionAtLeast }: { version , hash ? "" -, ... } @ args: fetchurl ({ @@ -35,6 +36,13 @@ fetchurl ({ --exclude=third_party/llvm \ --exclude=third_party/rust-src \ --exclude='build/linux/debian_*-sysroot' \ + '' + lib.optionalString (chromiumVersionAtLeast "127") '' + --exclude='*.tar.[a-zA-Z0-9][a-zA-Z0-9]' \ + --exclude='*.tar.[a-zA-Z0-9][a-zA-Z0-9][a-zA-Z0-9]' \ + --exclude=third_party/llvm-build \ + --exclude=third_party/rust-toolchain \ + --exclude=third_party/instrumented_libs \ + '' + '' --strip-components=1 tar \ |
