1{ stdenv, fetchPypi, buildPythonPackage
2, wxPython, pygments, numpy, vtk, traitsui, envisage, apptools
3, nose, mock
4, isPy3k
5}:
6
7buildPythonPackage rec {
8 pname = "mayavi";
9 version = "4.7.0";
10
11 src = fetchPypi {
12 inherit pname version;
13 extension = "tar.bz2";
14 sha256 = "02rg4j1vkny2piqn3f728kg34m54kgx396g6h5y7ykz2lk3f3h44";
15 };
16
17 # Discovery of 'vtk' in setuptools is not working properly, due to a missing
18 # .egg-info in the vtk package. It does however import and run just fine.
19 postPatch = ''
20 substituteInPlace mayavi/__init__.py --replace "'vtk'" ""
21 '';
22
23 propagatedBuildInputs = [ wxPython pygments numpy vtk traitsui envisage apptools ];
24
25 checkInputs = [ nose mock ];
26
27 disabled = isPy3k; # TODO: This would need pyqt5 instead of wxPython
28
29 doCheck = false; # Needs X server
30
31 meta = with stdenv.lib; {
32 description = "3D visualization of scientific data in Python";
33 homepage = https://github.com/enthought/mayavi;
34 maintainers = with stdenv.lib.maintainers; [ knedlsepp ];
35 license = licenses.bsdOriginal;
36 };
37}