whisper-cpp: disable installCheck on aarch64-linux when cudaSupport is enabled (#484719)

This commit is contained in:
Gaétan Lepage
2026-01-29 22:56:25 +00:00
committed by GitHub
+15 -5
View File
@@ -50,6 +50,13 @@ let
optionals
;
inherit (effectiveStdenv.hostPlatform)
isStatic
isLinux
isAarch64
isx86
;
cudaBuildInputs = with cudaPackages; [
cuda_cccl # <nv/target>
@@ -125,12 +132,12 @@ effectiveStdenv.mkDerivation (finalAttrs: {
(cmakeBool "WHISPER_SDL2" withSDL)
(cmakeBool "GGML_LTO" true)
(cmakeBool "GGML_NATIVE" false)
(cmakeBool "BUILD_SHARED_LIBS" (!effectiveStdenv.hostPlatform.isStatic))
(cmakeBool "BUILD_SHARED_LIBS" (!isStatic))
]
++ optionals effectiveStdenv.hostPlatform.isLinux [
++ optionals isLinux [
(cmakeBool "WHISPER_FFMPEG" withFFmpegSupport)
]
++ optionals (effectiveStdenv.hostPlatform.isx86 && !effectiveStdenv.hostPlatform.isStatic) [
++ optionals (isx86 && !isStatic) [
(cmakeBool "GGML_BACKEND_DL" true)
(cmakeBool "GGML_CPU_ALL_VARIANTS" true)
(cmakeFeature "GGML_BACKEND_DIR" "${placeholder "out"}/lib")
@@ -145,7 +152,7 @@ effectiveStdenv.mkDerivation (finalAttrs: {
# Build all targets supported by rocBLAS. When updating search for TARGET_LIST_ROCM
# in https://github.com/ROCmSoftwarePlatform/rocBLAS/blob/develop/CMakeLists.txt
# and select the line that matches the current nixpkgs version of rocBLAS.
"-DAMDGPU_TARGETS=${rocmGpuTargets}"
(cmakeFeature "AMDGPU_TARGETS" rocmGpuTargets)
]
++ optionals coreMLSupport [
(cmakeBool "WHISPER_COREML" true)
@@ -170,7 +177,10 @@ effectiveStdenv.mkDerivation (finalAttrs: {
requiredSystemFeatures = optionals rocmSupport [ "big-parallel" ]; # rocmSupport multiplies build time by the number of GPU targets, which takes arround 30 minutes on a 16-cores system to build
doInstallCheck = true;
# libcuda.so is provided by the driver at runtime and is not available in the sandbox
# /nix/store/...-whisper-cpp-1.8.3/bin/whisper-cli: error while loading shared libraries: libcuda.so.1: cannot open shared object file: No such file or directory
# NOTE: it is unclear why this isn't an issue on x86_64-linux
doInstallCheck = !(isLinux && isAarch64 && cudaSupport);
installCheckPhase = ''
runHook preInstallCheck