pythonPackages.vtk: init at 7.0.0

This commit is contained in:
Josef Kemetmüller 2019-01-31 22:18:27 +01:00 committed by Frederik Rietdijk
parent f126f2c9e3
commit 4fb342d6e4
2 changed files with 12 additions and 3 deletions

View File

@ -1,5 +1,6 @@
{ stdenv, fetchurl, cmake, libGLU, libGL, libX11, xorgproto, libXt, libtiff
, qtLib ? null
, enablePython ? false, python ? null
# Darwin support
, Cocoa, CoreServices, DiskArbitration, IOKit, CFNetwork, Security, GLUT, OpenGL
, ApplicationServices, CoreText, IOSurface, ImageIO, xpc, libobjc }:
@ -27,10 +28,12 @@ stdenv.mkDerivation rec {
++ optionals stdenv.isLinux [ libGLU libGL libX11 xorgproto libXt ]
++ optionals stdenv.isDarwin [ xpc Cocoa CoreServices DiskArbitration IOKit
CFNetwork Security ApplicationServices CoreText
IOSurface ImageIO OpenGL GLUT ];
IOSurface ImageIO OpenGL GLUT ]
++ optional enablePython [
python
];
propagatedBuildInputs = stdenv.lib.optionals stdenv.isDarwin [ libobjc ];
preBuild = ''
export LD_LIBRARY_PATH="$(pwd)/lib";
'';
@ -42,7 +45,8 @@ stdenv.mkDerivation rec {
# objects.
cmakeFlags = [ "-DCMAKE_C_FLAGS=-fPIC" "-DCMAKE_CXX_FLAGS=-fPIC" "-DVTK_USE_SYSTEM_TIFF=1" "-DOPENGL_INCLUDE_DIR=${libGL}/include" ]
++ optional (qtLib != null) [ "-DVTK_USE_QT:BOOL=ON" ]
++ optional stdenv.isDarwin "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks";
++ optional stdenv.isDarwin [ "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks" ]
++ optional enablePython [ "-DVTK_WRAP_PYTHON:BOOL=ON" ];
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
sed -i 's|COMMAND vtkHashSource|COMMAND "DYLD_LIBRARY_PATH=''${VTK_BINARY_DIR}/lib" ''${VTK_BINARY_DIR}/bin/vtkHashSource-7.0|' ./Parallel/Core/CMakeLists.txt

View File

@ -6671,6 +6671,11 @@ in {
visitor = callPackage ../development/python-modules/visitor { };
vtk = toPythonModule (pkgs.vtk.override {
inherit (self) python;
enablePython = true;
});
whitenoise = callPackage ../development/python-modules/whitenoise { };
XlsxWriter = callPackage ../development/python-modules/XlsxWriter { };