vtk: fix build with clang 16

This commit is contained in:
Weijia Wang
2023-11-05 15:22:41 +01:00
parent b746e1269b
commit 4baa84761d
@@ -86,6 +86,10 @@ in stdenv.mkDerivation rec {
"-DVTK_PYTHON_VERSION:STRING=${pythonMajor}"
];
env = lib.optionalAttrs stdenv.cc.isClang {
NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-function-pointer-types";
};
postPatch = optionalString stdenv.isDarwin ''
sed -i 's|COMMAND vtkHashSource|COMMAND "DYLD_LIBRARY_PATH=''${VTK_BINARY_DIR}/lib" ''${VTK_BINARY_DIR}/bin/vtkHashSource-${majorVersion}|' ./Parallel/Core/CMakeLists.txt
sed -i 's/fprintf(output, shift)/fprintf(output, "%s", shift)/' ./ThirdParty/libxml2/vtklibxml2/xmlschemas.c