2021-08-08 22:53:35 +03:00
|
|
|
{ lib, stdenv, fetchFromGitLab, fetchurl
|
|
|
|
, boost, cmake, ffmpeg, qtbase, qtx11extras
|
|
|
|
, qttools, qtxmlpatterns, qtsvg, gdal, gfortran, libXt, makeWrapper
|
|
|
|
, mkDerivation, ninja, mpi, python3, tbb, libGLU, libGL
|
|
|
|
, withDocs ? true
|
|
|
|
}:
|
2009-03-31 00:06:31 +04:00
|
|
|
|
2021-08-08 22:53:35 +03:00
|
|
|
let
|
2021-08-06 05:42:56 +03:00
|
|
|
version = "5.9.1";
|
2021-08-08 22:53:35 +03:00
|
|
|
|
|
|
|
docFiles = [
|
|
|
|
(fetchurl {
|
2021-08-10 11:20:32 +03:00
|
|
|
url = "https://www.paraview.org/paraview-downloads/download.php?submit=Download&version=v${lib.versions.majorMinor version}&type=data&os=Sources&downloadFile=ParaViewTutorial-${version}.pdf";
|
2021-08-08 22:53:35 +03:00
|
|
|
name = "Tutorial.pdf";
|
|
|
|
sha256 = "1knpirjbz3rv8p8n03p39vv8vi5imvxakjsssqgly09g0cnsikkw";
|
|
|
|
})
|
|
|
|
(fetchurl {
|
2021-08-10 11:20:32 +03:00
|
|
|
url = "https://www.paraview.org/paraview-downloads/download.php?submit=Download&version=v${lib.versions.majorMinor version}&type=data&os=Sources&downloadFile=ParaViewGettingStarted-${version}.pdf";
|
2021-08-08 22:53:35 +03:00
|
|
|
name = "GettingStarted.pdf";
|
|
|
|
sha256 = "14xhlvg7s7d5amqf4qfyamx2a6b66zf4cmlfm3s7iw3jq01x1lx6";
|
|
|
|
})
|
|
|
|
(fetchurl {
|
2021-08-10 11:20:32 +03:00
|
|
|
url = "https://www.paraview.org/paraview-downloads/download.php?submit=Download&version=v${lib.versions.majorMinor version}&type=data&os=Sources&downloadFile=ParaViewCatalystGuide-${version}.pdf";
|
2021-08-08 22:53:35 +03:00
|
|
|
name = "CatalystGuide.pdf";
|
|
|
|
sha256 = "133vcfrbg2nh15igl51ns6gnfn1is20vq6j0rg37wha697pmcr4a";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
in mkDerivation rec {
|
|
|
|
pname = "paraview";
|
|
|
|
inherit version;
|
2017-09-10 19:00:38 +03:00
|
|
|
|
2021-08-06 05:43:47 +03:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.kitware.com";
|
|
|
|
owner = "paraview";
|
|
|
|
repo = "paraview";
|
2017-09-10 19:00:38 +03:00
|
|
|
rev = "v${version}";
|
2021-08-06 05:42:56 +03:00
|
|
|
sha256 = "0pzic95br0vr785jnpxqmfxcljw3wk7bhm2xy0jfmwm1dh2b7xac";
|
2017-09-10 19:00:38 +03:00
|
|
|
fetchSubmodules = true;
|
2009-03-31 00:06:31 +04:00
|
|
|
};
|
|
|
|
|
2020-06-07 20:42:19 +03:00
|
|
|
# Find the Qt platform plugin "minimal"
|
2021-08-06 05:42:56 +03:00
|
|
|
preConfigure = ''
|
2020-06-07 20:42:19 +03:00
|
|
|
export QT_PLUGIN_PATH=${qtbase.bin}/${qtbase.qtPluginPrefix}
|
|
|
|
'';
|
2017-09-10 19:00:38 +03:00
|
|
|
|
|
|
|
# During build, binaries are called that rely on freshly built
|
|
|
|
# libraries. These reside in build/lib, and are not found by
|
|
|
|
# default.
|
|
|
|
preBuild = ''
|
2020-01-02 03:29:34 +03:00
|
|
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD/lib:$PWD/VTK/ThirdParty/vtkm/vtk-m/lib
|
2009-12-11 01:19:52 +03:00
|
|
|
'';
|
2015-03-06 14:09:01 +03:00
|
|
|
|
2020-06-07 20:42:19 +03:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DCMAKE_BUILD_TYPE=Release"
|
|
|
|
"-DPARAVIEW_ENABLE_FFMPEG=ON"
|
|
|
|
"-DPARAVIEW_ENABLE_GDAL=ON"
|
|
|
|
"-DPARAVIEW_ENABLE_MOTIONFX=ON"
|
|
|
|
"-DPARAVIEW_ENABLE_VISITBRIDGE=ON"
|
|
|
|
"-DPARAVIEW_ENABLE_XDMF3=ON"
|
|
|
|
"-DPARAVIEW_INSTALL_DEVELOPMENT_FILES=ON"
|
|
|
|
"-DPARAVIEW_USE_MPI=ON"
|
|
|
|
"-DPARAVIEW_USE_PYTHON=ON"
|
|
|
|
"-DVTK_SMP_IMPLEMENTATION_TYPE=TBB"
|
|
|
|
"-DVTKm_ENABLE_MPI=ON"
|
|
|
|
"-DCMAKE_INSTALL_LIBDIR=lib"
|
|
|
|
"-DCMAKE_INSTALL_INCLUDEDIR=include"
|
|
|
|
"-DCMAKE_INSTALL_BINDIR=bin"
|
|
|
|
"-DOpenGL_GL_PREFERENCE=GLVND"
|
|
|
|
"-GNinja"
|
|
|
|
];
|
2010-11-10 21:13:04 +03:00
|
|
|
|
2017-12-01 15:49:52 +03:00
|
|
|
nativeBuildInputs = [
|
2017-12-01 15:20:15 +03:00
|
|
|
cmake
|
2018-03-19 18:43:03 +03:00
|
|
|
makeWrapper
|
2020-06-07 20:42:19 +03:00
|
|
|
ninja
|
|
|
|
gfortran
|
2017-12-01 15:49:52 +03:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2021-08-10 11:20:32 +03:00
|
|
|
libGLU
|
|
|
|
libGL
|
2017-12-01 15:20:15 +03:00
|
|
|
libXt
|
2021-01-10 15:40:19 +03:00
|
|
|
mpi
|
2020-06-07 20:42:19 +03:00
|
|
|
tbb
|
|
|
|
boost
|
|
|
|
ffmpeg
|
|
|
|
gdal
|
2017-12-01 15:20:15 +03:00
|
|
|
qtbase
|
|
|
|
qtx11extras
|
|
|
|
qttools
|
|
|
|
qtxmlpatterns
|
2020-06-07 20:42:19 +03:00
|
|
|
qtsvg
|
2017-12-01 15:20:15 +03:00
|
|
|
];
|
2017-09-10 19:00:38 +03:00
|
|
|
|
2021-08-10 11:20:32 +03:00
|
|
|
postInstall = let docDir = "$out/share/paraview-${lib.versions.majorMinor version}/doc"; in
|
2021-08-08 22:53:35 +03:00
|
|
|
lib.optionalString withDocs ''
|
|
|
|
mkdir -p ${docDir};
|
|
|
|
for docFile in ${lib.concatStringsSep " " docFiles}; do
|
|
|
|
cp $docFile ${docDir}/$(stripHash $docFile);
|
|
|
|
done;
|
|
|
|
'';
|
|
|
|
|
2020-07-03 03:44:29 +03:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
(python3.withPackages (ps: with ps; [ numpy matplotlib mpi4py ]))
|
|
|
|
];
|
|
|
|
|
2021-01-11 10:54:33 +03:00
|
|
|
meta = with lib; {
|
2020-06-07 20:42:19 +03:00
|
|
|
homepage = "https://www.paraview.org/";
|
2009-10-02 00:18:17 +04:00
|
|
|
description = "3D Data analysis and visualization application";
|
2021-08-08 22:55:32 +03:00
|
|
|
license = licenses.bsd3;
|
2020-02-05 21:27:16 +03:00
|
|
|
maintainers = with maintainers; [ guibert ];
|
|
|
|
platforms = platforms.linux;
|
2009-10-02 00:18:17 +04:00
|
|
|
};
|
2009-03-31 00:06:31 +04:00
|
|
|
}
|