From b8354622d6d66b4055e9ab6a011e34176c33807b Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Tue, 26 Mar 2024 13:45:02 -0400 Subject: [PATCH] blender: 4.0.2 -> 4.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changelog: https://www.blender.org/download/releases/4-1/ Library updates: https://projects.blender.org/blender/blender/issues/113157 Blender now supports [GPU-accelerated OpenImageDenoise on select GPUs][1]. Enabled it for CUDA only for now as Blender 4.1.0 considers HIP (AMD) support unstable, and I don’t have any hardware for the SYCL (Intel) support, and it’s for very limited GPUs anyway (Xe-HPG datacenter). [1]: https://developer.blender.org/docs/release_notes/4.1/cycles/#supported-gpus --- pkgs/applications/misc/blender/default.nix | 24 ++++++---------------- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/pkgs/applications/misc/blender/default.nix b/pkgs/applications/misc/blender/default.nix index c0fb3b336d0f..8266f4bfd067 100644 --- a/pkgs/applications/misc/blender/default.nix +++ b/pkgs/applications/misc/blender/default.nix @@ -16,7 +16,6 @@ cudaSupport ? config.cudaSupport, dbus, embree, - fetchpatch, fetchurl, fetchzip, ffmpeg, @@ -68,7 +67,7 @@ pkg-config, potrace, pugixml, - python310Packages, # must use instead of python3.pkgs, see https://github.com/NixOS/nixpkgs/issues/211340 + python311Packages, # must use instead of python3.pkgs, see https://github.com/NixOS/nixpkgs/issues/211340 rocmPackages, # comes with a significantly larger closure size runCommand, spaceNavSupport ? stdenv.isLinux, @@ -82,7 +81,7 @@ }: let - python3Packages = python310Packages; + python3Packages = python311Packages; python3 = python3Packages.python; pyPkgsOpenusd = python3Packages.openusd.override { withOsl = false; }; @@ -100,25 +99,14 @@ in stdenv.mkDerivation (finalAttrs: { pname = "blender"; - version = "4.0.2"; + version = "4.1.0"; src = fetchurl { url = "https://download.blender.org/source/${finalAttrs.pname}-${finalAttrs.version}.tar.xz"; - hash = "sha256-qqDnKdp1kc+/RXcq92NFl32qp7EaCvNdmPkxPiRgd6M="; + hash = "sha256-3AAtguPDQMk4VcZoRzDQGAG2aaKbHMa3XuuZC6aecj8="; }; - patches = [ - ./draco.patch - (fetchpatch { - url = "https://projects.blender.org/blender/blender/commit/cf4365e555a759d5b3225bce77858374cb07faad.diff"; - hash = "sha256-Nypd04yFSHYa7RBa8kNmoApqJrU4qpaOle3tkj44d4g="; - }) - (fetchpatch { - # https://projects.blender.org/blender/blender/issues/117145 - url = "https://projects.blender.org/blender/blender/commit/eb99895c972b6c713294f68a34798aa51d36034a.patch"; - hash = "sha256-95nG5mW408lhKJ2BppgaUwBMMeXeGyBqho6mCfB53GI="; - }) - ] ++ lib.optional stdenv.isDarwin ./darwin.patch; + patches = [ ./draco.patch ] ++ lib.optional stdenv.isDarwin ./darwin.patch; postPatch = ( @@ -247,7 +235,7 @@ stdenv.mkDerivation (finalAttrs: { ] ++ lib.optionals (!stdenv.isAarch64) [ embree - openimagedenoise + (openimagedenoise.override { inherit cudaSupport; }) ] ++ ( if (!stdenv.isDarwin) then