at 22.05-pre 1.3 kB view raw
1{ lib, buildPythonPackage, pythonOlder, fetchPypi, wrapQtAppsHook 2, pyface, pygments, numpy, vtk, traitsui, envisage, apptools, pyqt5 3}: 4 5buildPythonPackage rec { 6 pname = "mayavi"; 7 version = "4.7.3"; 8 9 disabled = pythonOlder "3.8"; 10 11 src = fetchPypi { 12 inherit pname version; 13 extension = "tar.gz"; 14 sha256 = "Zw0AI7nNLSNGxFHbm6L2HaI6XfUDOyWuqJy22BuUZPA="; 15 }; 16 17 postPatch = '' 18 # Discovery of 'vtk' in setuptools is not working properly, due to a missing 19 # .egg-info in the vtk package. It does however import and run just fine. 20 substituteInPlace mayavi/__init__.py --replace "'vtk'" "" 21 22 # building the docs fails with the usual Qt xcb error, so skip: 23 substituteInPlace setup.py \ 24 --replace "build.build.run(self)" "build.build.run(self); return" 25 ''; 26 27 nativeBuildInputs = [ wrapQtAppsHook ]; 28 29 propagatedBuildInputs = [ 30 pyface pygments numpy vtk traitsui envisage apptools pyqt5 31 ]; 32 33 doCheck = false; # Needs X server 34 pythonImportsCheck = [ "mayavi" ]; 35 36 preFixup = '' 37 makeWrapperArgs+=("''${qtWrapperArgs[@]}") 38 ''; 39 40 meta = with lib; { 41 description = "3D visualization of scientific data in Python"; 42 homepage = "https://github.com/enthought/mayavi"; 43 maintainers = with maintainers; [ knedlsepp ]; 44 license = licenses.bsdOriginal; 45 }; 46}