sbcl: fix build on Darwin

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.
This commit is contained in:
Andrew Marshall
2025-10-28 15:30:30 -04:00
parent 9e0124a9dc
commit be092d0c7b
+4 -2
View File
@@ -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