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