From bb0565f350814ed5477894e772394f4af09c8037 Mon Sep 17 00:00:00 2001 From: Reno Dakota Date: Sat, 21 Dec 2024 21:32:00 -0800 Subject: [PATCH] chez: pin to clang-17 on x64 darwin `https://github.com/cisco/ChezScheme/issues/896` build fails with an invalid memory reference on clang 18 & 19 --- pkgs/by-name/ch/chez/package.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/ch/chez/package.nix b/pkgs/by-name/ch/chez/package.nix index 7e76fb762934c..52ac003255edd 100644 --- a/pkgs/by-name/ch/chez/package.nix +++ b/pkgs/by-name/ch/chez/package.nix @@ -1,6 +1,7 @@ { lib, stdenv, + llvmPackages_17, fetchurl, coreutils, cctools, @@ -10,8 +11,17 @@ libX11, libuuid, testers, -}: +}@args: +let + # x64 darwin fails with invalid memory reference with clang-18 & 19. + # https://github.com/cisco/ChezScheme/issues/896 + stdenv = + if args.stdenv.hostPlatform.isDarwin && args.stdenv.hostPlatform.isx86_64 then + llvmPackages_17.stdenv + else + args.stdenv; +in stdenv.mkDerivation (finalAttrs: { pname = "chez-scheme"; version = "10.1.0";