From 954e7dc3d1bd11001d4edc995f8980adf33d85db Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 22 Apr 2023 18:35:18 -0700 Subject: [PATCH] chromium: (cross) strip aarch64-linux-gnu- toolprefix only for native builds Our existing chromium expression strips the `aarch64-linux-gnu-` prefix off of toolchain names (like `aarch64-linux-gnu-gcc`) for all `Aarch64` builds. But when we are doing a cross compile *to* an `Aarch64` hostPlatform we need to leave those prefixes in place. This commit makes the prefix-stripping conditional on the build being a native build. --- pkgs/applications/networking/browsers/chromium/common.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index e6dcf83e3f3ed..0840fd079e7c7 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -239,7 +239,7 @@ let # Allow building against system libraries in official builds sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' tools/generate_shim_headers/generate_shim_headers.py - '' + lib.optionalString stdenv.isAarch64 '' + '' + lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform && stdenv.hostPlatform.isAarch64) '' substituteInPlace build/toolchain/linux/BUILD.gn \ --replace 'toolprefix = "aarch64-linux-gnu-"' 'toolprefix = ""' '' + lib.optionalString ungoogled ''