feat(blender): build 5.2 LTS with CUDA and OptiX

This commit is contained in:
Ryan Yin
2026-07-24 14:34:25 +08:00
parent 3550c6af2a
commit f80580772a
4 changed files with 45 additions and 37 deletions
+24 -6
View File
@@ -13,9 +13,15 @@ let
# so that I can use them in all my nixos/home-manager/darwin modules.
genSpecialArgs =
system:
let
pkgs-stable = import inputs.nixpkgs-stable {
inherit system;
config.allowUnfree = true;
};
in
inputs
// {
inherit mylib myvars;
inherit mylib myvars pkgs-stable;
# use unstable branch for some packages to get the latest updates
# pkgs-unstable = import inputs.nixpkgs-unstable {
@@ -28,11 +34,6 @@ let
# To use chrome, we need to allow the installation of non-free software
config.allowUnfree = true;
};
pkgs-stable = import inputs.nixpkgs-stable {
inherit system;
# To use chrome, we need to allow the installation of non-free software
config.allowUnfree = true;
};
pkgs-patched = import inputs.nixpkgs-patched {
inherit system;
# to use chrome, we need to allow the installation of non-free software
@@ -43,6 +44,23 @@ let
# to use chrome, we need to allow the installation of non-free software
config.allowUnfree = true;
};
pkgs-blender = import inputs.nixpkgs-blender {
inherit system;
config = lib.optionalAttrs (system == "x86_64-linux") {
allowUnfree = true;
cudaSupport = true;
# CUDA compute capability 8.9 targets the RTX 4090 (Ada) and avoids building kernels
# for unrelated GPU architectures.
cudaCapabilities = [ "8.9" ];
};
overlays = lib.optional (system == "x86_64-linux") (
_: prev: {
# CMake 4.2+ breaks OIDN's nested CUDA build with nixpkgs' split CUDAToolkit_ROOT.
# https://github.com/NixOS/nixpkgs/issues/544701
openimagedenoise = prev.openimagedenoise.override { cmake = pkgs-stable.cmake; };
}
);
};
pkgs-x64 = import nixpkgs {
system = "x86_64-linux";