1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 libGL,
6 libX11,
7 setuptools,
8 glcontext,
9 pythonOlder,
10}:
11
12buildPythonPackage rec {
13 pname = "moderngl";
14 version = "5.12.0";
15 pyproject = true;
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchPypi {
20 inherit pname version;
21 hash = "sha256-UpNqmMyy8uHW48sYUospGfaDHn4/kk54i1hzutzlEps=";
22 };
23
24 build-system = [ setuptools ];
25
26 buildInputs = [
27 libGL
28 libX11
29 ];
30
31 dependencies = [ glcontext ];
32
33 # Tests need a display to run.
34 doCheck = false;
35
36 pythonImportsCheck = [ "moderngl" ];
37
38 meta = with lib; {
39 description = "High performance rendering for Python";
40 homepage = "https://github.com/moderngl/moderngl";
41 changelog = "https://github.com/moderngl/moderngl/releases/tag/${version}";
42 license = licenses.mit;
43 maintainers = with maintainers; [ c0deaddict ];
44 # should be mesa.meta.platforms, darwin build breaks.
45 platforms = platforms.linux;
46 };
47}