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

47 lines
1.3 KiB
Nix
Raw Normal View History

2021-08-07 22:07:43 +00:00
{ lib, buildPythonPackage, pythonOlder, fetchPypi, wrapQtAppsHook
, pyface, pygments, numpy, vtk, traitsui, envisage, apptools, pyqt5
2019-01-31 21:41:34 +00:00
}:
buildPythonPackage rec {
pname = "mayavi";
2021-08-07 22:07:43 +00:00
version = "4.7.3";
2019-01-31 21:41:34 +00:00
2021-08-07 22:07:43 +00:00
disabled = pythonOlder "3.8";
2019-01-31 21:41:34 +00:00
src = fetchPypi {
inherit pname version;
2021-08-07 22:07:43 +00:00
extension = "tar.gz";
sha256 = "Zw0AI7nNLSNGxFHbm6L2HaI6XfUDOyWuqJy22BuUZPA=";
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
2021-08-07 22:07:43 +00:00
pythonImportsCheck = [ "mayavi" ];
2019-01-31 21:41:34 +00:00
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;
};
}