19 buildPythonPackage rec {
22 format = "setuptools";
24 disabled = pythonOlder "3.5";
26 src = fetchFromGitHub {
29 rev = "refs/tags/${version}";
30 hash = "sha256-V2G8QWXMxFDQpT4XDOJhIFI2V9VhDQCaXYBb/QVLxgM=";
34 (fetchpatch { # yet to be tagged
35 name = "relax-pyopengl.patch";
36 url = "https://github.com/mmatl/pyrender/commit/7c613e8aed7142df9ff40767a8f10b7a19b6255c.patch";
37 hash = "sha256-SXRV9RC3PfQGjjIQ+n97HZrSDPae3rAHnTBiHXSFLaY=";
42 # issue: https://github.com/mmatl/pyrender/issues/203
43 # mega pr: https://github.com/mmatl/pyrender/pull/216
44 # relevant pr commit: https://github.com/mmatl/pyrender/pull/216/commits/5069aeb957addff8919f05dc9be4040f55bff329
45 # the commit does not apply as a patch when cherry picked, hence the substituteInPlace
47 substituteInPlace tests/unit/test_meshes.py \
49 "bm = trimesh.load('tests/data/WaterBottle.glb').dump()[0]" \
50 'bm = trimesh.load("tests/data/WaterBottle.glb").geometry["WaterBottle"]'
53 propagatedBuildInputs = [
66 env.PYOPENGL_PLATFORM = "egl"; # enables headless rendering during check
73 # does not work inside sandbox, no GPU
74 "tests/unit/test_offscreen.py"
77 pythonImportsCheck = [ "pyrender" ];
80 homepage = "https://pyrender.readthedocs.io/en/latest/";
81 description = "Easy-to-use glTF 2.0-compliant OpenGL renderer for visualization of 3D scenes";
82 license = licenses.mit;
83 maintainers = with maintainers; [ pbsds ];