diff --git a/pkgs/development/libraries/vtk/generic.nix b/pkgs/development/libraries/vtk/generic.nix index fb2b11511b99..a3d3824a5410 100644 --- a/pkgs/development/libraries/vtk/generic.nix +++ b/pkgs/development/libraries/vtk/generic.nix @@ -67,8 +67,8 @@ in stdenv.mkDerivation rec { cmakeFlags = [ "-DCMAKE_C_FLAGS=-fPIC" "-DCMAKE_CXX_FLAGS=-fPIC" - "-DVTK_USE_SYSTEM_PNG=ON" - "-DVTK_USE_SYSTEM_TIFF=1" + "-D${if lib.versionOlder version "9.0" then "VTK_USE_SYSTEM_PNG" else "VTK_MODULE_USE_EXTERNAL_vtkpng"}=ON" + "-D${if lib.versionOlder version "9.0" then "VTK_USE_SYSTEM_TIFF" else "VTK_MODULE_USE_EXTERNAL_vtktiff"}=1" "-DOPENGL_INCLUDE_DIR=${libGL}/include" "-DCMAKE_INSTALL_LIBDIR=lib" "-DCMAKE_INSTALL_INCLUDEDIR=include"