fpc: fix on x86_64-darwin by downgrading Clang

An [upstream issue][] in fpc keeps it from building for x86_64-darwin on
Clang 18 or higher. Override it to use Clang 17 for now.

Fixes #416485.

[upstream issue]: https://gitlab.com/freepascal.org/fpc/source/-/issues/41045
This commit is contained in:
Rhys-T
2025-07-13 02:21:27 -04:00
parent e941e71095
commit af33502bad
+7 -1
View File
@@ -4990,7 +4990,13 @@ with pkgs;
flutter327 = flutterPackages.v3_27;
flutter324 = flutterPackages.v3_24;
fpc = callPackage ../development/compilers/fpc { };
fpc = callPackage ../development/compilers/fpc {
# https://github.com/NixOS/nixpkgs/issues/416485
# TODO: remove when upstream issue is fixed:
# https://gitlab.com/freepascal.org/fpc/source/-/issues/41045
stdenv =
if stdenv.cc.isClang && stdenv.hostPlatform.isx86_64 then llvmPackages_17.stdenv else stdenv;
};
gambit = callPackage ../development/compilers/gambit { };
gambit-unstable = callPackage ../development/compilers/gambit/unstable.nix { };