2024-08-13 17:15:44 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitLab,
|
|
|
|
fetchurl,
|
|
|
|
boost,
|
|
|
|
cmake,
|
|
|
|
ffmpeg,
|
|
|
|
wrapQtAppsHook,
|
|
|
|
qtbase,
|
|
|
|
qtx11extras,
|
|
|
|
qttools,
|
|
|
|
qtxmlpatterns,
|
|
|
|
qtsvg,
|
|
|
|
gdal,
|
|
|
|
gfortran,
|
|
|
|
libXt,
|
|
|
|
makeWrapper,
|
|
|
|
ninja,
|
|
|
|
mpi,
|
|
|
|
python3,
|
|
|
|
tbb,
|
|
|
|
libGLU,
|
|
|
|
libGL,
|
|
|
|
withDocs ? true,
|
2021-08-08 19:53:35 +00:00
|
|
|
}:
|
2009-03-30 20:06:31 +00:00
|
|
|
|
2021-08-08 19:53:35 +00:00
|
|
|
let
|
2024-08-27 12:10:13 +00:00
|
|
|
version = "5.13.0";
|
2021-08-08 19:53:35 +00:00
|
|
|
|
|
|
|
docFiles = [
|
|
|
|
(fetchurl {
|
2021-08-10 08:20:32 +00: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 19:53:35 +00:00
|
|
|
name = "Tutorial.pdf";
|
2024-08-27 12:10:13 +00:00
|
|
|
hash = "sha256-hoCa/aTy2mmsPHP3Zm0hLZlZKbtUMpjUlc2rFKKChco=";
|
2021-08-08 19:53:35 +00:00
|
|
|
})
|
|
|
|
(fetchurl {
|
2021-08-10 08:20:32 +00: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 19:53:35 +00:00
|
|
|
name = "GettingStarted.pdf";
|
2024-01-23 23:50:03 +00:00
|
|
|
hash = "sha256-ptPQA8By8Hj0qI5WRtw3ZhklelXeYeJwVaUdfd6msJM=";
|
2021-08-08 19:53:35 +00:00
|
|
|
})
|
|
|
|
(fetchurl {
|
2021-08-10 08:20:32 +00: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 19:53:35 +00:00
|
|
|
name = "CatalystGuide.pdf";
|
2024-08-27 12:10:13 +00:00
|
|
|
hash = "sha256-t1lJ1Wiswhdxovt2O4sXTXfFxshDiZZVdnkXt/+BQn8=";
|
2021-08-08 19:53:35 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2024-08-13 17:15:44 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2021-08-08 19:53:35 +00:00
|
|
|
pname = "paraview";
|
|
|
|
inherit version;
|
2017-09-10 16:00:38 +00:00
|
|
|
|
2021-08-06 02:43:47 +00:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.kitware.com";
|
|
|
|
owner = "paraview";
|
|
|
|
repo = "paraview";
|
2017-09-10 16:00:38 +00:00
|
|
|
rev = "v${version}";
|
2024-08-27 12:10:13 +00:00
|
|
|
hash = "sha256-JRSuvBON2n0UnbrFia4Qmf6eYb1Mc+Z7dIcXSeUhpIc=";
|
2017-09-10 16:00:38 +00:00
|
|
|
fetchSubmodules = true;
|
2009-03-30 20:06:31 +00:00
|
|
|
};
|
|
|
|
|
2020-06-07 17:42:19 +00:00
|
|
|
# Find the Qt platform plugin "minimal"
|
2021-08-06 02:42:56 +00:00
|
|
|
preConfigure = ''
|
2020-06-07 17:42:19 +00:00
|
|
|
export QT_PLUGIN_PATH=${qtbase.bin}/${qtbase.qtPluginPrefix}
|
|
|
|
'';
|
2017-09-10 16:00:38 +00:00
|
|
|
|
2020-06-07 17:42:19 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-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 18:13:04 +00:00
|
|
|
|
2017-12-01 12:49:52 +00:00
|
|
|
nativeBuildInputs = [
|
2017-12-01 12:20:15 +00:00
|
|
|
cmake
|
2018-03-19 15:43:03 +00:00
|
|
|
makeWrapper
|
2020-06-07 17:42:19 +00:00
|
|
|
ninja
|
|
|
|
gfortran
|
2023-02-07 17:25:01 +00:00
|
|
|
wrapQtAppsHook
|
2017-12-01 12:49:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2021-08-10 08:20:32 +00:00
|
|
|
libGLU
|
|
|
|
libGL
|
2017-12-01 12:20:15 +00:00
|
|
|
libXt
|
2021-01-10 12:40:19 +00:00
|
|
|
mpi
|
2020-06-07 17:42:19 +00:00
|
|
|
tbb
|
|
|
|
boost
|
|
|
|
ffmpeg
|
|
|
|
gdal
|
2017-12-01 12:20:15 +00:00
|
|
|
qtbase
|
|
|
|
qtx11extras
|
|
|
|
qttools
|
|
|
|
qtxmlpatterns
|
2020-06-07 17:42:19 +00:00
|
|
|
qtsvg
|
2017-12-01 12:20:15 +00:00
|
|
|
];
|
2017-09-10 16:00:38 +00:00
|
|
|
|
2024-08-13 17:15:44 +00:00
|
|
|
postInstall =
|
|
|
|
let
|
|
|
|
docDir = "$out/share/paraview-${lib.versions.majorMinor version}/doc";
|
|
|
|
in
|
2021-08-08 19:53:35 +00:00
|
|
|
lib.optionalString withDocs ''
|
|
|
|
mkdir -p ${docDir};
|
|
|
|
for docFile in ${lib.concatStringsSep " " docFiles}; do
|
|
|
|
cp $docFile ${docDir}/$(stripHash $docFile);
|
|
|
|
done;
|
|
|
|
'';
|
|
|
|
|
2020-07-03 00:44:29 +00:00
|
|
|
propagatedBuildInputs = [
|
2024-08-13 17:15:44 +00:00
|
|
|
(python3.withPackages (
|
|
|
|
ps: with ps; [
|
|
|
|
numpy
|
|
|
|
matplotlib
|
|
|
|
mpi4py
|
|
|
|
]
|
|
|
|
))
|
2020-07-03 00:44:29 +00:00
|
|
|
];
|
|
|
|
|
2024-08-13 17:15:19 +00:00
|
|
|
meta = {
|
|
|
|
homepage = "https://www.paraview.org";
|
2009-10-01 20:18:17 +00:00
|
|
|
description = "3D Data analysis and visualization application";
|
2024-08-13 17:15:19 +00:00
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
maintainers = with lib.maintainers; [ guibert ];
|
|
|
|
changelog = "https://www.kitware.com/paraview-${lib.concatStringsSep "-" (lib.versions.splitVersion version)}-release-notes";
|
|
|
|
platforms = lib.platforms.linux;
|
2009-10-01 20:18:17 +00:00
|
|
|
};
|
2009-03-30 20:06:31 +00:00
|
|
|
}
|