From be092d0c7b2c334835ae8eb02f5008260efea68f Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Tue, 28 Oct 2025 13:41:13 -0400 Subject: [PATCH] sbcl: fix build on Darwin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Coreutils v9.8 has a regression on Darwin that causes `__CF_USER_TEXT_ENCODING` env var to get added to `env`’s output. This causes a test failure. So get the variant of `env` from darwin.shell_cmds instead (and `uname`, to avoid having both pkgs in the closure). I submitted a bug report to Coreutils, but it is not yet in the tracker or list archives for me to link from here. --- pkgs/development/compilers/sbcl/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/sbcl/default.nix b/pkgs/development/compilers/sbcl/default.nix index bc4d345f0e3f..637e474a500d 100644 --- a/pkgs/development/compilers/sbcl/default.nix +++ b/pkgs/development/compilers/sbcl/default.nix @@ -2,6 +2,7 @@ lib, stdenv, callPackage, + darwin, ecl, coreutils, fetchurl, @@ -69,6 +70,7 @@ let "${sbclBootstrap}/bin/sbcl --disable-debugger --no-userinit --no-sysinit" else "${lib.getExe ecl} --norc"; + posixUtils = if stdenv.hostPlatform.isDarwin then darwin.shell_cmds else coreutils; in @@ -188,8 +190,8 @@ stdenv.mkDerivation (self: { # definitely NOT be patched this way, hence just a single * (and no # globstar). substituteInPlace ${if self.purgeNixReferences then "tests" else "{tests,src/code}"}/*.{lisp,sh} \ - --replace-quiet /usr/bin/env "${coreutils}/bin/env" \ - --replace-quiet /bin/uname "${coreutils}/bin/uname" \ + --replace-quiet /usr/bin/env "${posixUtils}/bin/env" \ + --replace-quiet /bin/uname "${posixUtils}/bin/uname" \ --replace-quiet /bin/sh "${stdenv.shell}" ) # Official source release tarballs will have a version.lispexpr, but if you