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 4
4
config ,
5
5
stdenv ,
6
6
mkShell ,
7
+ runCommand ,
7
8
cmake ,
8
9
ninja ,
9
10
pkg-config ,
87
88
]
88
89
) ;
89
90
91
+ darwinSymlinks = runCommand "darwin-build-symlinks" {
92
+ } ''
93
+ mkdir -p $out/bin
94
+ ln -s /usr/bin/xcrun $out/bin
95
+ '' ;
96
+
90
97
# apple_sdk is supposed to choose sane defaults, no need to handle isAarch64
91
98
# separately
92
99
darwinBuildInputs =
@@ -157,6 +164,8 @@ effectiveStdenv.mkDerivation (
157
164
substituteInPlace ./*.py --replace "/usr/bin/env python" "${ llama-python } /bin/python"
158
165
'' ;
159
166
167
+ __impureHostDeps = optionals ( effectiveStdenv . isDarwin && useMetalKit ) [ "/usr/bin/xcrun" ] ;
168
+
160
169
nativeBuildInputs =
161
170
[
162
171
cmake
@@ -173,6 +182,8 @@ effectiveStdenv.mkDerivation (
173
182
]
174
183
++ optionals ( effectiveStdenv . hostPlatform . isGnu && enableStatic ) [
175
184
glibc . static
185
+ ] ++ optionals ( effectiveStdenv . isDarwin && useMetalKit ) [
186
+ darwinSymlinks
176
187
] ;
177
188
178
189
buildInputs =
You can’t perform that action at this time.
0 commit comments