In preparation for the deprecation of `stdenv.isX`.
These shorthands are not conducive to cross-compilation because they
hide the platforms.
Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way
One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059
There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.
```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
Remove unnecessary conditionals for obsolete VTK versions no longer in
tree.
Lift `version` and remove `rec` from argument of `mkDerivation`.
This change does not affect the derivation produced for VTK 9 (at least
on x64 Linux).
VTK's cmake build system fails to generate an `.egg-info` file, which
various libraries in the Python package system (e.g. `pkg_resources`)
would use to identify the package. Work around this by generating an
`egg-info` file ourselves.
This will allow us to drop a workaround in `mayavi`.
Since the setting DCMAKE_SKIP_BUILD_RPATH was disabled, we can now run
the checkPhase of cmake derivations without having to tweak the
LD_LIBRARY_PATH anymore.
This fixed VTK that was broken on darwin in #158778 with "mv: Argument
list too long".
Reverts: 16a1b346 ('vtk: create versionless symlinks in /lib')
Reverts: 63599248 ('vtk: move headers out of /include/vtk-*')
This partially reverts: 010f6ee3 ('treewide: mark broken for darwin')
I believe this is a remanant of a global /usr/include which isn't
required with Nix and only complicates dependants' build scripts.
Backwards compatibility is maintained by way of a symlink.
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.
Previously ldd did not show the dependencies so presumably,
VTK 9 started linking them statically after build system changes,
as hinted by the following CMake warning:
Manually-specified variables were not used by the project:
VTK_USE_SYSTEM_PNG
VTK_USE_SYSTEM_TIFF
VTK doesn't seem produce png symbols on aarch64. We could probably
figure out how to fix that but we can also just tell it to use the
libpng we already have, which already works on aarch64.
vtk: clean up / reduce code repetition
This refactors the vtk expressions to use a generic base expression,
which is used for all 3 versions.
vtk 7.x no longer uses gcc 8, since the quirk of it not building with
gcc 9 seems to have been fixed.
This also makes the python bindings available for all 3 versions, and
fixes building them for vtk 8 by adding a patch.
- also create vtk_7 as several packages don't build with 8.x:
- itk5: vtkVersion.h header not found at compile time
- ants: version in tree (2.2.0) is incompatible with 8.2
- itk4: ants depends on both vtk and itk4, so use vtk_7
- gdcm: vtk header issue
- python3Packages.vtk: Python C API compilation error with Python 3.8
- upgrade vtkWithQt4 -> vtkWithQt5