diff --git a/pkgs/applications/graphics/paraview/default.nix b/pkgs/applications/graphics/paraview/default.nix index 3394fc6825c7..a8961ac49b6f 100644 --- a/pkgs/applications/graphics/paraview/default.nix +++ b/pkgs/applications/graphics/paraview/default.nix @@ -1,8 +1,28 @@ -{ 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 +{ + 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, }: let @@ -26,7 +46,8 @@ let }) ]; -in stdenv.mkDerivation rec { +in +stdenv.mkDerivation rec { pname = "paraview"; inherit version; @@ -86,7 +107,10 @@ in stdenv.mkDerivation rec { qtsvg ]; - postInstall = let docDir = "$out/share/paraview-${lib.versions.majorMinor version}/doc"; in + 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 @@ -95,7 +119,13 @@ in stdenv.mkDerivation rec { ''; propagatedBuildInputs = [ - (python3.withPackages (ps: with ps; [ numpy matplotlib mpi4py ])) + (python3.withPackages ( + ps: with ps; [ + numpy + matplotlib + mpi4py + ] + )) ]; meta = with lib; {