blender-hip: add blender with hip support (#187241)

This commit is contained in:
Sebastian Neubauer 2022-08-19 21:01:57 +02:00 committed by GitHub
parent 3bffe87eaf
commit a3c401f35e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View file

@ -6,6 +6,7 @@
, zlib, zstd, fftw, opensubdiv, freetype, jemalloc, ocl-icd, addOpenGLRunpath
, jackaudioSupport ? false, libjack2
, cudaSupport ? config.cudaSupport or false, cudaPackages ? {}
, hipSupport ? false, hip # comes with a significantly larger closure size
, colladaSupport ? true, opencollada
, spaceNavSupport ? stdenv.isLinux, libspnav
, makeWrapper
@ -86,7 +87,11 @@ stdenv.mkDerivation rec {
'${python310Packages.numpy}/${python.sitePackages}/numpy'
'' else ''
substituteInPlace extern/clew/src/clew.c --replace '"libOpenCL.so"' '"${ocl-icd}/lib/libOpenCL.so"'
'');
'') +
(if hipSupport then ''
substituteInPlace extern/hipew/src/hipew.c --replace '"/opt/rocm/hip/lib/libamdhip64.so"' '"${hip}/lib/libamdhip64.so"'
substituteInPlace extern/hipew/src/hipew.c --replace '"opt/rocm/hip/bin"' '"${hip}/bin"'
'' else "");
cmakeFlags =
[

View file

@ -26344,6 +26344,8 @@ with pkgs;
blender-with-packages = callPackage ../applications/misc/blender/wrapper.nix {};
blender-hip = blender.override { hipSupport = true; };
blflash = callPackage ../tools/misc/blflash { };
blogc = callPackage ../applications/misc/blogc { };