ollama: unbreak on darwin by using apple-sdk_15

This commit is contained in:
Pavol Rusnak 2025-08-10 11:12:05 +02:00
parent 91883328fb
commit a188ff8f04
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -18,6 +18,7 @@
cudaPackages, cudaPackages,
cudaArches ? cudaPackages.flags.realArches or [ ], cudaArches ? cudaPackages.flags.realArches or [ ],
autoAddDriverRunpath, autoAddDriverRunpath,
apple-sdk_15,
# passthru # passthru
nixosTests, nixosTests,
@ -152,7 +153,9 @@ goBuild (finalAttrs: {
]; ];
buildInputs = buildInputs =
lib.optionals enableRocm (rocmLibs ++ [ libdrm ]) ++ lib.optionals enableCuda cudaLibs; lib.optionals enableRocm (rocmLibs ++ [ libdrm ])
++ lib.optionals enableCuda cudaLibs
++ lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk_15 ];
# replace inaccurate version number with actual release version # replace inaccurate version number with actual release version
postPatch = '' postPatch = ''
@ -251,7 +254,6 @@ goBuild (finalAttrs: {
changelog = "https://github.com/ollama/ollama/releases/tag/v${finalAttrs.version}"; changelog = "https://github.com/ollama/ollama/releases/tag/v${finalAttrs.version}";
license = licenses.mit; license = licenses.mit;
platforms = if (rocmRequested || cudaRequested) then platforms.linux else platforms.unix; platforms = if (rocmRequested || cudaRequested) then platforms.linux else platforms.unix;
broken = stdenv.hostPlatform.isDarwin; # TODO: Remove after upstream issue is fixed, see issue #431464 and comments.
mainProgram = "ollama"; mainProgram = "ollama";
maintainers = with maintainers; [ maintainers = with maintainers; [
abysssol abysssol