paraview: 5.13.2 -> 6.0.0
This commit is contained in:
parent
6a1bee7a29
commit
6f3bed56f6
@ -1,137 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitLab,
|
||||
fetchurl,
|
||||
boost,
|
||||
cmake,
|
||||
ffmpeg,
|
||||
libsForQt5,
|
||||
gdal,
|
||||
gfortran,
|
||||
libXt,
|
||||
makeWrapper,
|
||||
ninja,
|
||||
mpi,
|
||||
python312,
|
||||
tbb,
|
||||
libGLU,
|
||||
libGL,
|
||||
withDocs ? true,
|
||||
}:
|
||||
|
||||
let
|
||||
version = "5.13.2";
|
||||
|
||||
docFiles = [
|
||||
(fetchurl {
|
||||
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";
|
||||
name = "Tutorial.pdf";
|
||||
hash = "sha256-jJ6YUT2rgVExfKv900LbSO+MDQ4u73K7cBScHxWoP+g=";
|
||||
})
|
||||
(fetchurl {
|
||||
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";
|
||||
name = "GettingStarted.pdf";
|
||||
hash = "sha256-ptPQA8By8Hj0qI5WRtw3ZhklelXeYeJwVaUdfd6msJM=";
|
||||
})
|
||||
(fetchurl {
|
||||
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";
|
||||
name = "CatalystGuide.pdf";
|
||||
hash = "sha256-Pl7X5cBj3OralkOw5A29CtXnA+agYr6kWHf/+KZNHow=";
|
||||
})
|
||||
];
|
||||
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "paraview";
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.kitware.com";
|
||||
owner = "paraview";
|
||||
repo = "paraview";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-29PLXVpvj8RLkSDWQgj5QjBZ6l1/0NoVx/qcJXOSssU=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
# Find the Qt platform plugin "minimal"
|
||||
preConfigure = ''
|
||||
export QT_PLUGIN_PATH=${libsForQt5.qtbase.bin}/${libsForQt5.qtbase.qtPluginPrefix}
|
||||
'';
|
||||
|
||||
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"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
makeWrapper
|
||||
ninja
|
||||
gfortran
|
||||
libsForQt5.wrapQtAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libGLU
|
||||
libGL
|
||||
libXt
|
||||
mpi
|
||||
tbb
|
||||
boost
|
||||
ffmpeg
|
||||
gdal
|
||||
libsForQt5.qtbase
|
||||
libsForQt5.qtx11extras
|
||||
libsForQt5.qttools
|
||||
libsForQt5.qtxmlpatterns
|
||||
libsForQt5.qtsvg
|
||||
];
|
||||
|
||||
postInstall =
|
||||
let
|
||||
docDir = "$out/share/paraview-${lib.versions.majorMinor version}/doc";
|
||||
in
|
||||
lib.optionalString withDocs ''
|
||||
mkdir -p ${docDir};
|
||||
for docFile in ${lib.concatStringsSep " " docFiles}; do
|
||||
cp $docFile ${docDir}/$(stripHash $docFile);
|
||||
done;
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
(python312.withPackages (
|
||||
ps: with ps; [
|
||||
numpy
|
||||
matplotlib
|
||||
mpi4py
|
||||
]
|
||||
))
|
||||
];
|
||||
|
||||
# 23k objects, >4h on a normal build slot
|
||||
requiredSystemFeatures = [ "big-parallel" ];
|
||||
|
||||
meta = {
|
||||
homepage = "https://www.paraview.org";
|
||||
description = "3D Data analysis and visualization application";
|
||||
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;
|
||||
};
|
||||
}
|
120
pkgs/by-name/pa/paraview/package.nix
Normal file
120
pkgs/by-name/pa/paraview/package.nix
Normal file
@ -0,0 +1,120 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
cmake,
|
||||
ninja,
|
||||
qt6Packages,
|
||||
protobuf,
|
||||
vtk-full,
|
||||
testers,
|
||||
}:
|
||||
let
|
||||
paraviewFilesUrl = "https://www.paraview.org/files";
|
||||
doc = fetchurl {
|
||||
url = "${paraviewFilesUrl}/v6.0/ParaViewGettingStarted-6.0.0.pdf";
|
||||
name = "GettingStarted.pdf";
|
||||
hash = "sha256-2ghvb0UXa0Z/YGWzCchB1NKowRdlC/ZQCI3y0tZUdbo=";
|
||||
};
|
||||
examples = fetchurl {
|
||||
# see https://gitlab.kitware.com/paraview/paraview-superbuild/-/blob/v6.0.0/versions.cmake?ref_type=tags#L21
|
||||
url = "${paraviewFilesUrl}/data/ParaViewTutorialData-20220629.tar.gz";
|
||||
hash = "sha256-OCLvWlwhBL9R981zXWZueMyXVeiqbxsmUYcwIu1doQ4=";
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "paraview";
|
||||
version = "6.0.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "${paraviewFilesUrl}/v${lib.versions.majorMinor finalAttrs.version}/ParaView-v${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-DuB65jd+Xpd2auv4WOuXWGaKUt8EHzGefJdQN6Y78Yk=";
|
||||
};
|
||||
|
||||
# When building paraview with external vtk, we can not infer resource_dir
|
||||
# from the path of vtk's libraries. Thus hardcoding the resource_dir.
|
||||
# See https://gitlab.kitware.com/paraview/paraview/-/issues/23043.
|
||||
postPatch = ''
|
||||
substituteInPlace Remoting/Core/vtkPVFileInformation.cxx \
|
||||
--replace-fail "return resource_dir;" "return \"$out/share/paraview\";"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
ninja
|
||||
qt6Packages.wrapQtAppsHook
|
||||
vtk-full.vtkPackages.python3Packages.pythonRecompileBytecodeHook
|
||||
];
|
||||
|
||||
# propagation required by paraview-config.cmake
|
||||
propagatedBuildInputs = [
|
||||
qt6Packages.qttools
|
||||
qt6Packages.qt5compat
|
||||
protobuf
|
||||
vtk-full
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "PARAVIEW_VERSIONED_INSTALL" false)
|
||||
(lib.cmakeBool "PARAVIEW_BUILD_WITH_EXTERNAL" true)
|
||||
(lib.cmakeBool "PARAVIEW_USE_EXTERNAL_VTK" true)
|
||||
(lib.cmakeBool "PARAVIEW_USE_QT" true)
|
||||
(lib.cmakeBool "PARAVIEW_USE_MPI" true)
|
||||
(lib.cmakeBool "PARAVIEW_USE_PYTHON" true)
|
||||
(lib.cmakeBool "PARAVIEW_ENABLE_WEB" true)
|
||||
(lib.cmakeBool "PARAVIEW_ENABLE_CATALYST" true)
|
||||
(lib.cmakeBool "PARAVIEW_ENABLE_VISITBRIDGE" true)
|
||||
(lib.cmakeBool "PARAVIEW_ENABLE_ADIOS2" true)
|
||||
(lib.cmakeBool "PARAVIEW_ENABLE_FFMPEG" true)
|
||||
(lib.cmakeBool "PARAVIEW_ENABLE_FIDES" true)
|
||||
(lib.cmakeBool "PARAVIEW_ENABLE_ALEMBIC" true)
|
||||
(lib.cmakeBool "PARAVIEW_ENABLE_LAS" true)
|
||||
(lib.cmakeBool "PARAVIEW_ENABLE_GDAL" true)
|
||||
(lib.cmakeBool "PARAVIEW_ENABLE_PDAL" true)
|
||||
(lib.cmakeBool "PARAVIEW_ENABLE_OPENTURNS" true)
|
||||
(lib.cmakeBool "PARAVIEW_ENABLE_MOTIONFX" true)
|
||||
(lib.cmakeBool "PARAVIEW_ENABLE_OCCT" true)
|
||||
(lib.cmakeBool "PARAVIEW_ENABLE_XDMF3" true)
|
||||
(lib.cmakeFeature "CMAKE_INSTALL_BINDIR" "bin")
|
||||
(lib.cmakeFeature "CMAKE_INSTALL_LIBDIR" "lib")
|
||||
(lib.cmakeFeature "CMAKE_INSTALL_INCLUDEDIR" "include")
|
||||
(lib.cmakeFeature "CMAKE_INSTALL_DOCDIR" "share/paraview/doc")
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
install -Dm644 ${doc} $out/share/paraview/doc/${doc.name}
|
||||
mkdir -p $out/share/paraview/examples
|
||||
tar --strip-components=1 -xzf ${examples} -C $out/share/paraview/examples
|
||||
''
|
||||
+ lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
install -Dm644 ../Qt/Components/Resources/Icons/pvIcon.svg $out/share/icons/hicolor/scalable/apps/paraview.svg
|
||||
''
|
||||
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
ln -s ../Applications/paraview.app/Contents/MacOS/paraview $out/bin/paraview
|
||||
'';
|
||||
|
||||
passthru.tests = {
|
||||
cmake-config = testers.hasCmakeConfigModules {
|
||||
moduleNames = [ "ParaView" ];
|
||||
|
||||
package = finalAttrs.finalPackage;
|
||||
|
||||
nativeBuildInputs = [
|
||||
qt6Packages.wrapQtAppsHook
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "3D Data analysis and visualization application";
|
||||
homepage = "https://www.paraview.org";
|
||||
changelog = "https://www.kitware.com/paraview-${lib.concatStringsSep "-" (lib.versions.splitVersion finalAttrs.version)}-release-notes";
|
||||
mainProgram = "paraview";
|
||||
license = lib.licenses.bsd3;
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = with lib.maintainers; [
|
||||
guibert
|
||||
qbisi
|
||||
];
|
||||
};
|
||||
})
|
@ -13350,8 +13350,6 @@ with pkgs;
|
||||
|
||||
parsec-bin = callPackage ../applications/misc/parsec/bin.nix { };
|
||||
|
||||
paraview = libsForQt5.callPackage ../applications/graphics/paraview { };
|
||||
|
||||
pekwm = callPackage ../by-name/pe/pekwm/package.nix {
|
||||
awk = gawk;
|
||||
grep = gnugrep;
|
||||
|
Loading…
x
Reference in New Issue
Block a user