Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09 1.3 kB view raw
1{ lib, buildPythonPackage, isPy27, fetchPypi, wrapQtAppsHook 2, pyface, pygments, numpy, vtk, traitsui, envisage, apptools, pyqt5 3}: 4 5buildPythonPackage rec { 6 pname = "mayavi"; 7 version = "4.7.1"; 8 9 disabled = isPy27; 10 11 src = fetchPypi { 12 inherit pname version; 13 extension = "tar.bz2"; 14 sha256 = "095p7mds6kqqrp7xqv24iygr3mw85rm7x41wb5y4yc3gi1pznldy"; 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 35 preFixup = '' 36 makeWrapperArgs+=("''${qtWrapperArgs[@]}") 37 ''; 38 39 meta = with lib; { 40 description = "3D visualization of scientific data in Python"; 41 homepage = "https://github.com/enthought/mayavi"; 42 maintainers = with maintainers; [ knedlsepp ]; 43 license = licenses.bsdOriginal; 44 }; 45}