diff --git a/pkgs/by-name/on/onnxruntime/package.nix b/pkgs/by-name/on/onnxruntime/package.nix index 2964c8a1ac37..9bd15499960e 100644 --- a/pkgs/by-name/on/onnxruntime/package.nix +++ b/pkgs/by-name/on/onnxruntime/package.nix @@ -23,6 +23,7 @@ pythonSupport ? true, cudaSupport ? config.cudaSupport, ncclSupport ? config.cudaSupport, + withFullProtobuf ? false, cudaPackages ? { }, }@inputs: @@ -195,7 +196,7 @@ effectiveStdenv.mkDerivation rec { (lib.cmakeFeature "ONNX_CUSTOM_PROTOC_EXECUTABLE" (lib.getExe protobuf)) (lib.cmakeBool "onnxruntime_BUILD_SHARED_LIB" true) (lib.cmakeBool "onnxruntime_BUILD_UNIT_TESTS" doCheck) - (lib.cmakeBool "onnxruntime_USE_FULL_PROTOBUF" false) + (lib.cmakeBool "onnxruntime_USE_FULL_PROTOBUF" withFullProtobuf) (lib.cmakeBool "onnxruntime_USE_CUDA" cudaSupport) (lib.cmakeBool "onnxruntime_USE_NCCL" (cudaSupport && ncclSupport)) (lib.cmakeBool "onnxruntime_ENABLE_LTO" (!cudaSupport || cudaPackages.cudaOlder "12.8"))