blender: fix hip support (#410748)

This commit is contained in:
Paul Mulders 2025-06-08 05:17:55 +02:00 committed by GitHub
parent 0060edafbf
commit af9ffbb640
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -134,8 +134,8 @@ stdenv'.mkDerivation (finalAttrs: {
'${lib.getLib brotli}/lib/libbrotlidec.dylib'
'')
+ (lib.optionalString hipSupport ''
substituteInPlace extern/hipew/src/hipew.c --replace '"/opt/rocm/hip/lib/libamdhip64.so"' '"${rocmPackages.clr}/lib/libamdhip64.so"'
substituteInPlace extern/hipew/src/hipew.c --replace '"opt/rocm/hip/bin"' '"${rocmPackages.clr}/bin"'
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"'
'');
env.NIX_CFLAGS_COMPILE = "-I${python3}/include/${python3.libPrefix}";