2020-04-13 18:50:19 +01:00
|
|
|
{ lib, buildPythonPackage, isPy27, fetchPypi, wrapQtAppsHook
|
|
|
|
, pyface, pygments, numpy, vtk, traitsui, envisage, apptools, pyqt5
|
2019-01-31 21:41:34 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "mayavi";
|
2020-03-27 23:45:02 +00:00
|
|
|
version = "4.7.1";
|
2019-01-31 21:41:34 +00:00
|
|
|
|
2020-04-13 18:50:19 +01:00
|
|
|
disabled = isPy27;
|
|
|
|
|
2019-01-31 21:41:34 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
extension = "tar.bz2";
|
2020-03-27 23:45:02 +00:00
|
|
|
sha256 = "095p7mds6kqqrp7xqv24iygr3mw85rm7x41wb5y4yc3gi1pznldy";
|
2019-01-31 21:41:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2020-04-13 18:50:19 +01:00
|
|
|
# Discovery of 'vtk' in setuptools is not working properly, due to a missing
|
|
|
|
# .egg-info in the vtk package. It does however import and run just fine.
|
2019-01-31 21:41:34 +00:00
|
|
|
substituteInPlace mayavi/__init__.py --replace "'vtk'" ""
|
|
|
|
|
2020-04-13 18:50:19 +01:00
|
|
|
# building the docs fails with the usual Qt xcb error, so skip:
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "build.build.run(self)" "build.build.run(self); return"
|
|
|
|
'';
|
2019-01-31 21:41:34 +00:00
|
|
|
|
2020-04-13 18:50:19 +01:00
|
|
|
nativeBuildInputs = [ wrapQtAppsHook ];
|
2019-01-31 21:41:34 +00:00
|
|
|
|
2020-04-13 18:50:19 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
pyface pygments numpy vtk traitsui envisage apptools pyqt5
|
|
|
|
];
|
2019-01-31 21:41:34 +00:00
|
|
|
|
|
|
|
doCheck = false; # Needs X server
|
|
|
|
|
2020-04-13 18:50:19 +01:00
|
|
|
preFixup = ''
|
|
|
|
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2019-01-31 21:41:34 +00:00
|
|
|
description = "3D visualization of scientific data in Python";
|
2020-03-27 23:45:02 +00:00
|
|
|
homepage = "https://github.com/enthought/mayavi";
|
2020-04-13 18:50:19 +01:00
|
|
|
maintainers = with maintainers; [ knedlsepp ];
|
2019-01-31 21:41:34 +00:00
|
|
|
license = licenses.bsdOriginal;
|
|
|
|
};
|
|
|
|
}
|