blender-hip: remove in favor of config.rocmSupport = true (#463064)

This commit is contained in:
Luna
2026-01-05 02:32:13 +00:00
committed by GitHub
4 changed files with 20 additions and 19 deletions
+18 -17
View File
@@ -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,
@@ -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,14 +132,14 @@ 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' \
--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"'
@@ -149,18 +150,18 @@ 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)
(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)
@@ -187,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)
@@ -221,7 +222,7 @@ stdenv'.mkDerivation (finalAttrs: {
cmake
llvmPackages.llvm.dev
makeWrapper
python311Packages.wrapPython
python3Packages.wrapPython
]
++ lib.optionals cudaSupport [
addDriverRunpath
@@ -263,13 +264,13 @@ stdenv'.mkDerivation (finalAttrs: {
potrace
pugixml
python3
python311Packages.materialx
python3Packages.materialx
rubberband
zlib
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
@@ -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 = {
@@ -18,6 +18,7 @@
"audiobookshelf",
"babeldoc",
"backgroundremover",
"blender",
"btop",
"btop-cuda",
"c3d",
+1
View File
@@ -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
-2
View File
@@ -10348,8 +10348,6 @@ with pkgs;
pinentry = pinentry-curses;
};
blender-hip = blender.override { hipSupport = true; };
blucontrol = callPackage ../applications/misc/blucontrol/wrapper.nix {
inherit (haskellPackages) ghcWithPackages;
};