From af33502badc3b1cd0f39b3c10ec5d7f00b7e0547 Mon Sep 17 00:00:00 2001 From: Rhys-T <108157737+Rhys-T@users.noreply.github.com> Date: Sun, 13 Jul 2025 02:19:57 -0400 Subject: [PATCH] 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 --- pkgs/top-level/all-packages.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 92d5f2bb6c13..0826594726da 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { };