python312Packages.tiny-cuda-nn: mark as broken when !cudaSupport

Without it, the build phase fails because CUDA_HOME is None in
torch's CppExtension (because `torch.cuda._is_compiled` is false).

https://github.com/pytorch/pytorch/blob/cb4cd6166e5f6d7c0180dcca27454691ef910625/torch/utils/cpp_extension.py#L243

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
This commit is contained in:
Ihar Hrachyshka
2025-04-05 20:30:48 -04:00
parent 5946446fe8
commit a6fff1179e
+7 -2
View File
@@ -1,4 +1,5 @@
{
config,
cmake,
cudaPackages,
fetchFromGitHub,
@@ -176,7 +177,11 @@ stdenv.mkDerivation (finalAttrs: {
license = licenses.bsd3;
maintainers = with maintainers; [ connorbaker ];
platforms = platforms.linux;
# g++: error: unrecognized command-line option '-mf16c'
broken = stdenv.hostPlatform.isAarch64;
badPlatforms = [
# g++: error: unrecognized command-line option '-mf16c'
lib.systems.inspect.patterns.isAarch64
];
# Requires torch.cuda._is_compiled() == True to build
broken = !config.cudaSupport;
};
})