openai-whisper-cpp: fix cuda build (#347975)

This commit is contained in:
Artturin 2024-10-19 00:50:05 +03:00 committed by GitHub
commit 02b61c1506
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -67,7 +67,7 @@ effectiveStdenv.mkDerivation (finalAttrs: {
cudaNewStr = "-lcuda -L${cudaPackages.cuda_cudart}/lib/stubs ";
in lib.optionalString cudaSupport ''
substituteInPlace Makefile \
--replace '${cudaOldStr}' '${cudaNewStr}'
--replace-fail '${cudaOldStr}' '${cudaNewStr}'
'';
env = lib.optionalAttrs stdenv.hostPlatform.isDarwin {
@ -75,7 +75,7 @@ effectiveStdenv.mkDerivation (finalAttrs: {
WHISPER_COREML_ALLOW_FALLBACK = "1";
WHISPER_METAL_EMBED_LIBRARY = "1";
} // lib.optionalAttrs cudaSupport {
WHISPER_CUBLAS = "1";
GGML_CUDA = "1";
};
makeFlags = [ "main" "stream" "command" ];