Commit 477ad870 authored by Weijia Wang's avatar Weijia Wang
Browse files

openvdb: fix build with tbb_2021_8 on x86_64_darwin

parent 1860d8a1
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -20,6 +20,11 @@ stdenv.mkDerivation rec

  cmakeFlags = [ "-DOPENVDB_CORE_STATIC=OFF" ];

  # error: aligned deallocation function of type 'void (void *, std::align_val_t) noexcept' is only available on macOS 10.13 or newer
  env = lib.optionalAttrs (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13" && lib.versionAtLeast tbb.version "2021.8.0") {
    NIX_CFLAGS_COMPILE = "-faligned-allocation";
  };

  postFixup = ''
    substituteInPlace $dev/lib/cmake/OpenVDB/FindOpenVDB.cmake \
      --replace \''${OPENVDB_LIBRARYDIR} $out/lib \