From 042c10fab8b3de113772e54f8158d239b1b917f0 Mon Sep 17 00:00:00 2001 From: Joseph Stahl <1269177+josephst@users.noreply.github.com> Date: Sun, 17 Mar 2024 15:19:10 -0400 Subject: [PATCH] add /usr/bin to path for building MetalKit with xcrun Fixes https://github.com/ggerganov/llama.cpp/issues/6117 --- .devops/nix/package.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.devops/nix/package.nix b/.devops/nix/package.nix index c7fa2203a07515..d53e35050c8158 100644 --- a/.devops/nix/package.nix +++ b/.devops/nix/package.nix @@ -157,6 +157,11 @@ effectiveStdenv.mkDerivation ( substituteInPlace ./*.py --replace "/usr/bin/env python" "${llama-python}/bin/python" ''; + # requires sandboxing to be off or relaxed on MacOS (off by default) + preConfigure = lib.optionals useMetalKit '' + export PATH=/usr/bin:$PATH # make sure /usr/bin/xcrun is on PATH + ''; + nativeBuildInputs = [ cmake