From a6fff1179ee69fc3a487efc66ca48600f72c7f51 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Wed, 2 Apr 2025 16:24:56 -0400 Subject: [PATCH] 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 --- pkgs/by-name/ti/tiny-cuda-nn/package.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ti/tiny-cuda-nn/package.nix b/pkgs/by-name/ti/tiny-cuda-nn/package.nix index 25b43707dde6..fea13b07a791 100644 --- a/pkgs/by-name/ti/tiny-cuda-nn/package.nix +++ b/pkgs/by-name/ti/tiny-cuda-nn/package.nix @@ -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; }; })