1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/applications/graphics/paraview/default.nix

69 lines
1.9 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, cmake, makeWrapper, qtbase , qttools, python
, libGLU, libGL , libXt, qtx11extras, qtxmlpatterns , mkDerivation }:
mkDerivation rec {
pname = "paraview";
version = "5.6.3";
2017-09-10 17:00:38 +01:00
# fetching from GitHub instead of taking an "official" source
# tarball because of missing submodules there
src = fetchFromGitHub {
owner = "Kitware";
repo = "ParaView";
rev = "v${version}";
sha256 = "0zcij59pg47c45gfddnpbin13w16smzhcbivzm1k4pg4366wxq1q";
2017-09-10 17:00:38 +01:00
fetchSubmodules = true;
};
cmakeFlags = [
"-DPARAVIEW_ENABLE_PYTHON=ON"
"-DPARAVIEW_INSTALL_DEVELOPMENT_FILES=ON"
"-DPARAVIEW_ENABLE_EMBEDDED_DOCUMENTATION=OFF"
"-DOpenGL_GL_PREFERENCE=GLVND"
];
2017-09-10 17:00:38 +01:00
# During build, binaries are called that rely on freshly built
# libraries. These reside in build/lib, and are not found by
# default.
preBuild = ''
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD/lib:$PWD/VTK/ThirdParty/vtkm/vtk-m/lib
'';
enableParallelBuilding = true;
nativeBuildInputs = [
2017-12-01 12:20:15 +00:00
cmake
makeWrapper
];
buildInputs = [
2017-12-01 12:20:15 +00:00
python
python.pkgs.numpy
2019-11-10 16:44:34 +00:00
libGLU libGL
2017-12-01 12:20:15 +00:00
libXt
qtbase
qtx11extras
qttools
qtxmlpatterns
];
2017-09-10 17:00:38 +01:00
# Paraview links into the Python library, resolving symbolic links on the way,
# so we need to put the correct sitePackages (with numpy) back on the path
preFixup = ''
wrapQtApp $out/bin/paraview \
--prefix PYTHONPATH "${python.pkgs.numpy}/${python.sitePackages}"
wrapQtApp $out/bin/pvbatch \
--prefix PYTHONPATH "${python.pkgs.numpy}/${python.sitePackages}"
wrapQtApp $out/bin/pvpython \
--prefix PYTHONPATH "${python.pkgs.numpy}/${python.sitePackages}"
'';
meta = with stdenv.lib; {
homepage = http://www.paraview.org/;
description = "3D Data analysis and visualization application";
license = licenses.free;
maintainers = with maintainers; [ guibert ];
platforms = platforms.linux;
};
}