nixpkgs/pkgs/development/python-modules/mayavi/default.nix

46 lines
1.2 KiB
Nix
Raw Normal View History

{ 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";
version = "4.7.1";
2019-01-31 21:41:34 +00:00
disabled = isPy27;
2019-01-31 21:41:34 +00:00
src = fetchPypi {
inherit pname version;
extension = "tar.bz2";
sha256 = "095p7mds6kqqrp7xqv24iygr3mw85rm7x41wb5y4yc3gi1pznldy";
2019-01-31 21:41:34 +00:00
};
postPatch = ''
# 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'" ""
# 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
nativeBuildInputs = [ wrapQtAppsHook ];
2019-01-31 21:41:34 +00:00
propagatedBuildInputs = [
pyface pygments numpy vtk traitsui envisage apptools pyqt5
];
2019-01-31 21:41:34 +00:00
doCheck = false; # Needs X server
preFixup = ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
'';
meta = with lib; {
2019-01-31 21:41:34 +00:00
description = "3D visualization of scientific data in Python";
homepage = "https://github.com/enthought/mayavi";
maintainers = with maintainers; [ knedlsepp ];
2019-01-31 21:41:34 +00:00
license = licenses.bsdOriginal;
};
}