mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-08-27 13:33:57 +02:00
feat(blender): build 5.2 LTS with CUDA and OptiX
This commit is contained in:
+24
-6
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user