onnxruntime: simplify Nix expression

ncclSupport is already guarded with cudaSupport
This commit is contained in:
Christian Kögler
2026-06-04 05:32:18 +02:00
parent 49666df296
commit dd509002f8
+1 -3
View File
@@ -138,8 +138,6 @@ effectiveStdenv.mkDerivation (finalAttrs: {
substituteInPlace cmake/libonnxruntime.pc.cmake.in \
--replace-fail '$'{prefix}/@CMAKE_INSTALL_ @CMAKE_INSTALL_
echo "find_package(cudnn_frontend REQUIRED)" > cmake/external/cudnn_frontend.cmake
''
+ ''
substituteInPlace onnxruntime/core/platform/posix/env.cc --replace-fail \
"return PathString{};" \
"return PathString(\"$out/lib/\");"
@@ -289,7 +287,7 @@ effectiveStdenv.mkDerivation (finalAttrs: {
(lib.cmakeBool "onnxruntime_BUILD_UNIT_TESTS" finalAttrs.doCheck)
(lib.cmakeBool "onnxruntime_USE_FULL_PROTOBUF" withFullProtobuf)
(lib.cmakeBool "onnxruntime_USE_CUDA" cudaSupport)
(lib.cmakeBool "onnxruntime_USE_NCCL" (cudaSupport && ncclSupport))
(lib.cmakeBool "onnxruntime_USE_NCCL" ncclSupport)
(lib.cmakeBool "onnxruntime_USE_MIGRAPHX" rocmSupport)
(lib.cmakeBool "onnxruntime_USE_COREML" coremlSupport)
(lib.cmakeBool "onnxruntime_ENABLE_LTO" (!cudaSupport || cudaPackages.cudaOlder "12.8"))