From 1aff0e4c2e3aebadf31ce22b9076515d142ffdc9 Mon Sep 17 00:00:00 2001 From: Peter Waller
Date: Sat, 3 May 2025 10:48:43 +0100 Subject: [PATCH] gn: 2168 -> 2233 (2024-05-03 -> 2025-04-28) * Matches commit to chromium info.json https://github.com/NixOS/nixpkgs/blob/a5df9ceb5f057fdbe6f7e7a2a0350c878e34da25/pkgs/applications/networking/browsers/chromium/info.json#L807 * Drops now unneeded patch. * Use -Wno-format-security. * Update chromium gn rev path comment to info.json. Tested x86_64-linux, aarch64-linux, pkgsStatic.gn, pkgsCross.aarch64-multiplatform.gn. Signed-off-by: Peter Waller
---
.../networking/browsers/chromium/default.nix | 10 ----------
pkgs/by-name/gn/gn/generic.nix | 12 +++---------
pkgs/by-name/gn/gn/package.nix | 12 ++++++------
3 files changed, 9 insertions(+), 25 deletions(-)
diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix
index d8c3cf2e3780..990eafa06677 100644
--- a/pkgs/applications/networking/browsers/chromium/default.nix
+++ b/pkgs/applications/networking/browsers/chromium/default.nix
@@ -85,16 +85,6 @@ let
url = "https://gn.googlesource.com/gn";
inherit (upstream-info.deps.gn) rev hash;
};
-
- # 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" ];
-
- # At the time of writing, gn is at v2024-05-13 and has a backported patch.
- # This patch appears to be already present in v2024-09-09 (from M130), which
- # results in the patch not applying and thus failing the build.
- # As a work around until gn is updated again, we filter specifically that patch out.
- patches = lib.filter (e: lib.getName e != "LFS64.patch") oldAttrs.patches;
});
});
diff --git a/pkgs/by-name/gn/gn/generic.nix b/pkgs/by-name/gn/gn/generic.nix
index 218a46d3fb98..bbff6b96836a 100644
--- a/pkgs/by-name/gn/gn/generic.nix
+++ b/pkgs/by-name/gn/gn/generic.nix
@@ -41,15 +41,6 @@ stdenv.mkDerivation {
inherit rev sha256;
};
- patches = [
- (fetchpatch {
- name = "LFS64.patch";
- url = "https://gn.googlesource.com/gn/+/b5ff50936a726ff3c8d4dfe2a0ae120e6ce1350d%5E%21/?format=TEXT";
- decode = "base64 -d";
- hash = "sha256-/kh8t/Ip1EG2OIhydS//st/C80KJ4P31vGx7j8QpFh0=";
- })
- ];
-
nativeBuildInputs = [
ninja
python3
@@ -69,6 +60,9 @@ stdenv.mkDerivation {
);
env.NIX_CFLAGS_COMPILE = "-Wno-error";
+ # 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" ];
buildPhase = ''
python build/gen.py --no-last-commit-position
diff --git a/pkgs/by-name/gn/gn/package.nix b/pkgs/by-name/gn/gn/package.nix
index 33386b79dc0a..fa3322edd222 100644
--- a/pkgs/by-name/gn/gn/package.nix
+++ b/pkgs/by-name/gn/gn/package.nix
@@ -1,10 +1,10 @@
{ callPackage, ... }@args:
callPackage ./generic.nix args {
- # Note: Please use the recommended version for Chromium stabe, i.e. from
- #