File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 44 config ,
55 stdenv ,
66 mkShell ,
7+ runCommand ,
78 cmake ,
89 ninja ,
910 pkg-config ,
8788 ]
8889 ) ;
8990
91+ darwinSymlinks = runCommand "darwin-build-symlinks" {
92+ } ''
93+ mkdir -p $out/bin
94+ ln -s /usr/bin/xcrun $out/bin
95+ '' ;
96+
9097 # apple_sdk is supposed to choose sane defaults, no need to handle isAarch64
9198 # separately
9299 darwinBuildInputs =
@@ -157,6 +164,8 @@ effectiveStdenv.mkDerivation (
157164 substituteInPlace ./*.py --replace "/usr/bin/env python" "${ llama-python } /bin/python"
158165 '' ;
159166
167+ __impureHostDeps = optionals ( effectiveStdenv . isDarwin && useMetalKit ) [ "/usr/bin/xcrun" ] ;
168+
160169 nativeBuildInputs =
161170 [
162171 cmake
@@ -173,6 +182,8 @@ effectiveStdenv.mkDerivation (
173182 ]
174183 ++ optionals ( effectiveStdenv . hostPlatform . isGnu && enableStatic ) [
175184 glibc . static
185+ ] ++ optionals ( effectiveStdenv . isDarwin && useMetalKit ) [
186+ darwinSymlinks
176187 ] ;
177188
178189 buildInputs =
You can’t perform that action at this time.
0 commit comments