Skip to content

Commit 0163079

Browse files
committed
Narrow gcc14 fixincludes override to isLinux only
Using !isDarwin would also rebuild gcc14 for Windows (mingw32) targets unnecessarily. The fixincludes /usr/include issue only affects Linux builders, so scope to isLinux to avoid touching darwin and windows gcc14 derivations.
1 parent f3dd8cf commit 0163079

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

flake.nix

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
happy = final.haskell.lib.compose.overrideCabal (drv: {
5050
disallowGhcReference = false;
5151
}) prev.happy;
52-
} // prev.lib.optionalAttrs (!prev.stdenv.hostPlatform.isDarwin) {
52+
} // prev.lib.optionalAttrs prev.stdenv.hostPlatform.isLinux {
5353
# GCC 14's fixincludes step uses a configure-time substitution
5454
# @BUILD_SYSTEM_HEADER_DIR@ that bakes /usr/include into the
5555
# generated Makefile. On NixOS-based builders (Determinate Nix
@@ -59,8 +59,9 @@
5959
# --disable-fixincludes skips the fixincludes step entirely, which
6060
# is safe for Nix where all headers are store-managed. Already
6161
# used by nixpkgs' standalone libgcc build for the same reason.
62-
# Only applied on Linux — on Darwin, GCC 14 bootstrap fails with
63-
# __FLT_EVAL_METHOD__ errors against Apple SDK 14.4.
62+
# Only applied on Linux — avoids unnecessary gcc14 rebuilds on
63+
# Darwin (where gfortran fails against Apple SDK 14.4) and
64+
# Windows (where the mingw cross-GCC doesn't have this issue).
6465
gcc14 = prev.wrapCC (
6566
prev.gcc14.cc.overrideAttrs (old: {
6667
configureFlags = (old.configureFlags or []) ++ [ "--disable-fixincludes" ];

0 commit comments

Comments
 (0)