ollama: use cudaPackages.backendStdenv (#375388)

This commit is contained in:
Pavol Rusnak
2025-01-22 15:33:57 +01:00
committed by GitHub
+6 -7
View File
@@ -129,7 +129,10 @@ let
wrapperArgs = builtins.concatStringsSep " " wrapperOptions;
goBuild =
if enableCuda then buildGoModule.override { stdenv = overrideCC stdenv gcc12; } else buildGoModule;
if enableCuda then
buildGoModule.override { stdenv = cudaPackages.backendStdenv; }
else
buildGoModule;
inherit (lib) licenses platforms maintainers;
in
goBuild {
@@ -146,9 +149,7 @@ goBuild {
CLBlast_DIR = "${clblast}/lib/cmake/CLBlast";
HIP_PATH = rocmPath;
}
// lib.optionalAttrs enableCuda {
CUDA_PATH = cudaPath;
};
// lib.optionalAttrs enableCuda { CUDA_PATH = cudaPath; };
nativeBuildInputs =
[
@@ -225,9 +226,7 @@ goBuild {
__darwinAllowLocalNetworking = true;
nativeInstallCheck = [
versionCheckHook
];
nativeInstallCheck = [ versionCheckHook ];
versionCheckProgramArg = [ "--version" ];
doInstallCheck = true;