From 6122f6c4df066ba222de408d22754ea31c47f100 Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Thu, 1 Jan 2026 13:29:58 -0500 Subject: [PATCH 1/3] blender: cleanup usage of python3Packages This avoids needing to change a ton of references when updating the input. --- pkgs/by-name/bl/blender/package.nix | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/pkgs/by-name/bl/blender/package.nix b/pkgs/by-name/bl/blender/package.nix index b458b7e7c057..1f190f65dc4e 100644 --- a/pkgs/by-name/bl/blender/package.nix +++ b/pkgs/by-name/bl/blender/package.nix @@ -95,8 +95,9 @@ let (!stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux) || stdenv.hostPlatform.isDarwin; vulkanSupport = !stdenv.hostPlatform.isDarwin; - python3 = python311Packages.python; - pyPkgsOpenusd = python311Packages.openusd.override (old: { + python3Packages = python311Packages; + python3 = python3Packages.python; + pyPkgsOpenusd = python3Packages.openusd.override (old: { opensubdiv = old.opensubdiv.override { inherit cudaSupport; }; withOsl = false; }); @@ -131,7 +132,7 @@ stdenv'.mkDerivation (finalAttrs: { substituteInPlace source/creator/CMakeLists.txt \ --replace-fail '${"$"}{LIBDIR}/python' \ '${python3}' \ - --replace-fail '${"$"}{LIBDIR}/materialx/' '${python311Packages.materialx}/' + --replace-fail '${"$"}{LIBDIR}/materialx/' '${python3Packages.materialx}/' substituteInPlace build_files/cmake/platform/platform_apple.cmake \ --replace-fail '${"$"}{LIBDIR}/brotli/lib/libbrotlicommon-static.a' \ '${lib.getLib brotli}/lib/libbrotlicommon.dylib' \ @@ -149,12 +150,12 @@ stdenv'.mkDerivation (finalAttrs: { cmakeFlags = [ "-C../build_files/cmake/config/blender_release.cmake" - (lib.cmakeFeature "MaterialX_DIR" "${python311Packages.materialx}/lib/cmake/MaterialX") + (lib.cmakeFeature "MaterialX_DIR" "${python3Packages.materialx}/lib/cmake/MaterialX") (lib.cmakeFeature "PYTHON_INCLUDE_DIR" "${python3}/include/${python3.libPrefix}") (lib.cmakeFeature "PYTHON_LIBPATH" "${python3}/lib") (lib.cmakeFeature "PYTHON_LIBRARY" "${python3.libPrefix}") - (lib.cmakeFeature "PYTHON_NUMPY_INCLUDE_DIRS" "${python311Packages.numpy_1}/${python3.sitePackages}/numpy/core/include") - (lib.cmakeFeature "PYTHON_NUMPY_PATH" "${python311Packages.numpy_1}/${python3.sitePackages}") + (lib.cmakeFeature "PYTHON_NUMPY_INCLUDE_DIRS" "${python3Packages.numpy_1}/${python3.sitePackages}/numpy/core/include") + (lib.cmakeFeature "PYTHON_NUMPY_PATH" "${python3Packages.numpy_1}/${python3.sitePackages}") (lib.cmakeFeature "PYTHON_VERSION" "${python3.pythonVersion}") (lib.cmakeBool "WITH_BUILDINFO" false) @@ -221,7 +222,7 @@ stdenv'.mkDerivation (finalAttrs: { cmake llvmPackages.llvm.dev makeWrapper - python311Packages.wrapPython + python3Packages.wrapPython ] ++ lib.optionals cudaSupport [ addDriverRunpath @@ -263,7 +264,7 @@ stdenv'.mkDerivation (finalAttrs: { potrace pugixml python3 - python311Packages.materialx + python3Packages.materialx rubberband zlib zstd @@ -316,7 +317,7 @@ stdenv'.mkDerivation (finalAttrs: { pythonPath = let - ps = python311Packages; + ps = python3Packages; in [ ps.materialx @@ -362,13 +363,13 @@ stdenv'.mkDerivation (finalAttrs: { passthru = { python = python3; - pythonPackages = python311Packages; + pythonPackages = python3Packages; withPackages = f: (callPackage ./wrapper.nix { }).override { blender = finalAttrs.finalPackage; - extraModules = (f python311Packages); + extraModules = (f python3Packages); }; tests = { From 187291c1c3633e6975e9fa61b31288114551b9c8 Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Thu, 30 Oct 2025 11:26:24 -0400 Subject: [PATCH 2/3] blender: rename hipSupport -> rocmSupport MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prior to e720baecf0371b0c92b6c1bddebe9f21ce2fd050 (Nov 2023), there was no global config.rocmSupport, and Blender’s hipSupport param predates that. Since the global config now exists, defer to that instead. The closure size of various ROCm packages has also been reduced recently in 32d957e0cd38f83fd7a40f9a3fe1dd04f5fd7f0f. At the time I wrote this, `pkgsRocm.blender` was 3.1 GiB (vs. 2.5 GiB for `pkgs.blender`). So remove the comment. Add blender to the rocm release attrs so Hydra will build `pkgsRocm.blender`. --- pkgs/by-name/bl/blender/package.nix | 12 ++++++------ .../rocm-modules/6/release-attrPaths.json | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/bl/blender/package.nix b/pkgs/by-name/bl/blender/package.nix index 1f190f65dc4e..f4cec841f317 100644 --- a/pkgs/by-name/bl/blender/package.nix +++ b/pkgs/by-name/bl/blender/package.nix @@ -23,7 +23,6 @@ gettext, glew, gmp, - hipSupport ? false, jackaudioSupport ? false, jemalloc, lib, @@ -68,7 +67,8 @@ potrace, pugixml, python311Packages, # must use python3Packages instead of python3.pkgs, see https://github.com/NixOS/nixpkgs/issues/211340 - rocmPackages, # comes with a significantly larger closure size + rocmPackages, + rocmSupport ? config.rocmSupport, rubberband, runCommand, shaderc, @@ -139,7 +139,7 @@ stdenv'.mkDerivation (finalAttrs: { --replace-fail '${"$"}{LIBDIR}/brotli/lib/libbrotlidec-static.a' \ '${lib.getLib brotli}/lib/libbrotlidec.dylib' '') - + (lib.optionalString hipSupport '' + + (lib.optionalString rocmSupport '' substituteInPlace extern/hipew/src/hipew.c --replace-fail '"/opt/rocm/hip/lib/libamdhip64.so.${lib.versions.major rocmPackages.clr.version}"' '"${rocmPackages.clr}/lib/libamdhip64.so"' substituteInPlace extern/hipew/src/hipew.c --replace-fail '"opt/rocm/hip/bin"' '"${rocmPackages.clr}/bin"' substituteInPlace extern/hipew/src/hiprtew.cc --replace-fail '"/opt/rocm/lib/libhiprt64.so"' '"${rocmPackages.hiprt}/lib/libhiprt64.so"' @@ -161,7 +161,7 @@ stdenv'.mkDerivation (finalAttrs: { (lib.cmakeBool "WITH_BUILDINFO" false) (lib.cmakeBool "WITH_CPU_CHECK" false) (lib.cmakeBool "WITH_CYCLES_CUDA_BINARIES" cudaSupport) - (lib.cmakeBool "WITH_CYCLES_DEVICE_HIP" hipSupport) + (lib.cmakeBool "WITH_CYCLES_DEVICE_HIP" rocmSupport) (lib.cmakeBool "WITH_CYCLES_DEVICE_ONEAPI" false) (lib.cmakeBool "WITH_CYCLES_DEVICE_OPTIX" cudaSupport) (lib.cmakeBool "WITH_CYCLES_EMBREE" embreeSupport) @@ -188,7 +188,7 @@ stdenv'.mkDerivation (finalAttrs: { (lib.cmakeFeature "OPTIX_ROOT_DIR" "${optix}") (lib.cmakeBool "WITH_CYCLES_CUDA_BINARIES" true) ] - ++ lib.optionals hipSupport [ + ++ lib.optionals rocmSupport [ (lib.cmakeFeature "HIPRT_INCLUDE_DIR" "${rocmPackages.hiprt}/include") (lib.cmakeBool "WITH_CYCLES_DEVICE_HIPRT" true) (lib.cmakeBool "WITH_CYCLES_HIP_BINARIES" true) @@ -270,7 +270,7 @@ stdenv'.mkDerivation (finalAttrs: { zstd ] ++ lib.optional embreeSupport embree - ++ lib.optional hipSupport rocmPackages.clr + ++ lib.optional rocmSupport rocmPackages.clr ++ lib.optional openImageDenoiseSupport (openimagedenoise.override { inherit cudaSupport; }) ++ ( if (!stdenv.hostPlatform.isDarwin) then diff --git a/pkgs/development/rocm-modules/6/release-attrPaths.json b/pkgs/development/rocm-modules/6/release-attrPaths.json index c77c53292c73..286734db1920 100644 --- a/pkgs/development/rocm-modules/6/release-attrPaths.json +++ b/pkgs/development/rocm-modules/6/release-attrPaths.json @@ -18,6 +18,7 @@ "audiobookshelf", "babeldoc", "backgroundremover", + "blender", "btop", "btop-cuda", "c3d", From d23e37dccaeebe99ede551f5ec89930e91b8b84c Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Tue, 18 Nov 2025 21:19:53 -0500 Subject: [PATCH 3/3] blender-hip: remove in favor of rocmSupport or pkgsRocm.blender --- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 181e875e7708..c912bf17bc64 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -364,6 +364,7 @@ mapAliases { bitwarden_rs-sqlite = throw "'bitwarden_rs-sqlite' has been renamed to/replaced by 'vaultwarden-sqlite'"; # Converted to throw 2025-10-27 bitwarden_rs-vault = throw "'bitwarden_rs-vault' has been renamed to/replaced by 'vaultwarden-vault'"; # Converted to throw 2025-10-27 blas-reference = throw "blas-reference has been removed since it has been discontinued as free-standing package. It is now contained within lapack-reference."; # Added 2025-10-21 + blender-hip = throw "blender-hip has been removed in favor of setting `config.rocmSupport = true` or using `pkgsRocm.blender`"; # Added 2026-01-04 blender-with-packages = throw "blender-with-packages is deprecated in in favor of blender.withPackages, e.g. `blender.withPackages(ps: [ ps.foobar ])`"; # Converted to throw 2025-10-26 blockbench-electron = throw "'blockbench-electron' has been renamed to/replaced by 'blockbench'"; # Converted to throw 2025-10-27 bloomeetunes = throw "bloomeetunes is unmaintained and has been removed"; # Added 2025-08-26 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 200bb64670e8..be7a0ea4133d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10367,8 +10367,6 @@ with pkgs; pinentry = pinentry-curses; }; - blender-hip = blender.override { hipSupport = true; }; - blucontrol = callPackage ../applications/misc/blucontrol/wrapper.nix { inherit (haskellPackages) ghcWithPackages; };