paraview: fix build against qt-6.10.1

This commit is contained in:
qbisi
2025-12-03 08:47:39 +08:00
parent bd70899635
commit ece0f4ee06
+9 -3
View File
@@ -31,12 +31,18 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-XlasevXpJbPP0/q4JHCTPLq8fo/ah+FK9k+ZXWBk6wY=";
};
# When building paraview with external vtk, we can not infer resource_dir
# from the path of vtk's libraries. Thus hardcoding the resource_dir.
# See https://gitlab.kitware.com/paraview/paraview/-/issues/23043.
postPatch = ''
# When building paraview with external vtk, we can not infer resource_dir
# from the path of vtk's libraries. Thus hardcoding the resource_dir.
# See https://gitlab.kitware.com/paraview/paraview/-/issues/23043.
substituteInPlace Remoting/Core/vtkPVFileInformation.cxx \
--replace-fail "return resource_dir;" "return \"$out/share/paraview\";"
# fix build against qt-6.10.1
substituteInPlace Qt/Core/{pqFlatTreeViewEventTranslator,pqQVTKWidgetEventTranslator}.cxx \
ThirdParty/QtTesting/vtkqttesting/{pqAbstractItemViewEventTranslator,pqBasicWidgetEventTranslator}.cxx \
--replace-fail "mouseEvent->buttons()" "static_cast<int>(mouseEvent->buttons())" \
--replace-fail "mouseEvent->modifiers()" "static_cast<int>(mouseEvent->modifiers())"
'';
nativeBuildInputs = [