From 6944c7c7f7c82fccfe4e216baafb842c821b729d Mon Sep 17 00:00:00 2001 From: Willy Hille Date: Fri, 26 Jun 2026 15:34:27 +0200 Subject: [PATCH] blender: respect cudaCapabilities this should speed up builds by not building binaries for unused cuda compute levels see https://developer.nvidia.com/cuda/gpus and https://github.com/blender/blender/blob/1f262d6832021d855a643c5c6afbb0ee60194356/CMakeLists.txt#L650-L653 --- pkgs/by-name/bl/blender/package.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/by-name/bl/blender/package.nix b/pkgs/by-name/bl/blender/package.nix index 224139c850af..fa3e8aea19df 100644 --- a/pkgs/by-name/bl/blender/package.nix +++ b/pkgs/by-name/bl/blender/package.nix @@ -9,6 +9,7 @@ ceres-solver, cmake, config, + cudaArches ? cudaPackages.flags.realArches, cudaPackages, cudaSupport ? config.cudaSupport, dbus, @@ -201,6 +202,7 @@ stdenv'.mkDerivation (finalAttrs: { (lib.cmakeFeature "ALEMBIC_LIBRARY" "${lib.getLib alembic}/lib/libAlembic${stdenv.hostPlatform.extensions.sharedLibrary}") ] ++ lib.optionals cudaSupport [ + (lib.cmakeFeature "CYCLES_CUDA_BINARIES_ARCH" (lib.concatStringsSep ";" cudaArches)) (lib.cmakeFeature "OPTIX_ROOT_DIR" "${optix}") (lib.cmakeBool "WITH_CYCLES_CUDA_BINARIES" true) ]