vtk_7: Fix enableQt build

VTK 7 builds with Qt 4 by default but we only support Qt 5, so let’s switch to that.
Also Qt changed some headers so let’s backport the VTK patch to fix the build.

Changed files
+18 -8
pkgs
development
libraries
+16 -8
pkgs/development/libraries/vtk/7.x.nix
··· 2 2 majorVersion = "7.1"; 3 3 minorVersion = "1"; 4 4 sourceSha256 = "0nm7xwwj7rnsxjdv2ssviys8nhci4n9iiiqm2y14s520hl2dsp1d"; 5 - patchesToFetch = [{ 6 - url = "https://gitlab.kitware.com/vtk/vtk/-/commit/706f1b397df09a27ab8981ab9464547028d0c322.diff"; 7 - sha256 = "1q3pi5h40g05pzpbqp75xlgzvbfvyw8raza51svmi7d8dlslqybx"; 8 - } 9 - { 10 - url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/sci-libs/vtk/files/vtk-8.2.0-gcc-10.patch?id=c4256f68d3589570443075eccbbafacf661f785f"; 11 - sha256 = "sha256:0bpwrdfmi15grsg4jy7bzj2z6511a0c160cmw5lsi65aabyh7cl5"; 12 - } 5 + patchesToFetch = [ 6 + { 7 + url = "https://gitlab.kitware.com/vtk/vtk/-/commit/706f1b397df09a27ab8981ab9464547028d0c322.diff"; 8 + sha256 = "1q3pi5h40g05pzpbqp75xlgzvbfvyw8raza51svmi7d8dlslqybx"; 9 + } 10 + 11 + { 12 + url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/sci-libs/vtk/files/vtk-8.2.0-gcc-10.patch?id=c4256f68d3589570443075eccbbafacf661f785f"; 13 + sha256 = "sha256:0bpwrdfmi15grsg4jy7bzj2z6511a0c160cmw5lsi65aabyh7cl5"; 14 + } 15 + 16 + # Add missing include required with recent Qt. 17 + { 18 + url = "https://gitlab.kitware.com/vtk/vtk/-/commit/797f28697d5ba50c1fa2bc5596af626a3c277826.diff"; 19 + sha256 = "BFjoKws1hVD3Ly9RS4lGN62J6RTyI1E8ATHrZdzg7ds="; 20 + } 13 21 ]; 14 22 }
+2
pkgs/development/libraries/vtk/generic.nix
··· 75 75 "-DCMAKE_INSTALL_BINDIR=bin" 76 76 ] ++ optionals enableQt [ 77 77 "-D${if lib.versionOlder version "9.0" then "VTK_Group_Qt:BOOL=ON" else "VTK_GROUP_ENABLE_Qt:STRING=YES"}" 78 + ] ++ optionals (enableQt && lib.versionOlder version "8.0") [ 79 + "-DVTK_QT_VERSION=5" 78 80 ] 79 81 ++ optionals stdenv.isDarwin [ "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks" ] 80 82 ++ optionals enablePython [