Merge pull request #133183 from hrhino/fix/paraview

paraview: 5.8.0 -> 5.9.1, install documentation, cleanup

authored by

David Guibert and committed by
GitHub
8d8ad8aa 8c28f4fe

+46 -21
+46 -21
pkgs/applications/graphics/paraview/default.nix
··· 1 - { boost, cmake, fetchFromGitHub, ffmpeg, qtbase, qtx11extras, 2 - qttools, qtxmlpatterns, qtsvg, gdal, gfortran, libXt, makeWrapper, 3 - mkDerivation, ninja, mpi, python3, lib, tbb, libGLU, libGL }: 4 5 - mkDerivation rec { 6 pname = "paraview"; 7 - version = "5.8.0"; 8 9 - src = fetchFromGitHub { 10 - owner = "Kitware"; 11 - repo = "ParaView"; 12 rev = "v${version}"; 13 - sha256 = "1mka6wwg9mbkqi3phs29mvxq6qbc44sspbm4awwamqhilh4grhrj"; 14 fetchSubmodules = true; 15 }; 16 17 - # Avoid error: format not a string literal and 18 - # no format arguments [-Werror=format-security] 19 preConfigure = '' 20 - substituteInPlace VTK/Common/Core/vtkLogger.h \ 21 - --replace 'vtkLogScopeF(verbosity_name, __func__)' 'vtkLogScopeF(verbosity_name, "%s", __func__)' 22 - 23 - substituteInPlace VTK/Common/Core/vtkLogger.h \ 24 - --replace 'vtkVLogScopeF(level, __func__)' 'vtkVLogScopeF(level, "%s", __func__)' 25 - ''; 26 - 27 - # Find the Qt platform plugin "minimal" 28 - patchPhase = '' 29 export QT_PLUGIN_PATH=${qtbase.bin}/${qtbase.qtPluginPrefix} 30 ''; 31 ··· 77 qtsvg 78 ]; 79 80 propagatedBuildInputs = [ 81 (python3.withPackages (ps: with ps; [ numpy matplotlib mpi4py ])) 82 ]; ··· 84 meta = with lib; { 85 homepage = "https://www.paraview.org/"; 86 description = "3D Data analysis and visualization application"; 87 - license = licenses.free; 88 maintainers = with maintainers; [ guibert ]; 89 platforms = platforms.linux; 90 }; 91 }
··· 1 + { lib, stdenv, fetchFromGitLab, fetchurl 2 + , boost, cmake, ffmpeg, qtbase, qtx11extras 3 + , qttools, qtxmlpatterns, qtsvg, gdal, gfortran, libXt, makeWrapper 4 + , mkDerivation, ninja, mpi, python3, tbb, libGLU, libGL 5 + , withDocs ? true 6 + }: 7 + 8 + let 9 + version = "5.9.1"; 10 + major = "5.9"; 11 12 + docFiles = [ 13 + (fetchurl { 14 + url = "https://www.paraview.org/paraview-downloads/download.php?submit=Download&version=v${major}&type=data&os=Sources&downloadFile=ParaViewTutorial-${version}.pdf"; 15 + name = "Tutorial.pdf"; 16 + sha256 = "1knpirjbz3rv8p8n03p39vv8vi5imvxakjsssqgly09g0cnsikkw"; 17 + }) 18 + (fetchurl { 19 + url = "https://www.paraview.org/paraview-downloads/download.php?submit=Download&version=v${major}&type=data&os=Sources&downloadFile=ParaViewGettingStarted-${version}.pdf"; 20 + name = "GettingStarted.pdf"; 21 + sha256 = "14xhlvg7s7d5amqf4qfyamx2a6b66zf4cmlfm3s7iw3jq01x1lx6"; 22 + }) 23 + (fetchurl { 24 + url = "https://www.paraview.org/paraview-downloads/download.php?submit=Download&version=v${major}&type=data&os=Sources&downloadFile=ParaViewCatalystGuide-${version}.pdf"; 25 + name = "CatalystGuide.pdf"; 26 + sha256 = "133vcfrbg2nh15igl51ns6gnfn1is20vq6j0rg37wha697pmcr4a"; 27 + }) 28 + ]; 29 + 30 + in mkDerivation rec { 31 pname = "paraview"; 32 + inherit version; 33 34 + src = fetchFromGitLab { 35 + domain = "gitlab.kitware.com"; 36 + owner = "paraview"; 37 + repo = "paraview"; 38 rev = "v${version}"; 39 + sha256 = "0pzic95br0vr785jnpxqmfxcljw3wk7bhm2xy0jfmwm1dh2b7xac"; 40 fetchSubmodules = true; 41 }; 42 43 + # Find the Qt platform plugin "minimal" 44 preConfigure = '' 45 export QT_PLUGIN_PATH=${qtbase.bin}/${qtbase.qtPluginPrefix} 46 ''; 47 ··· 93 qtsvg 94 ]; 95 96 + postInstall = let docDir = "$out/share/paraview-${major}/doc"; in 97 + lib.optionalString withDocs '' 98 + mkdir -p ${docDir}; 99 + for docFile in ${lib.concatStringsSep " " docFiles}; do 100 + cp $docFile ${docDir}/$(stripHash $docFile); 101 + done; 102 + ''; 103 + 104 propagatedBuildInputs = [ 105 (python3.withPackages (ps: with ps; [ numpy matplotlib mpi4py ])) 106 ]; ··· 108 meta = with lib; { 109 homepage = "https://www.paraview.org/"; 110 description = "3D Data analysis and visualization application"; 111 + license = licenses.bsd3; 112 maintainers = with maintainers; [ guibert ]; 113 platforms = platforms.linux; 114 }; 115 + 116 }