1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, isPy3k
5, numpy
6, moderngl
7, pyglet
8, pillow
9, pyrr
10, glcontext
11}:
12
13buildPythonPackage rec {
14 pname = "moderngl_window";
15 version = "2.4.2";
16
17 src = fetchFromGitHub {
18 owner = "moderngl";
19 repo = pname;
20 rev = "refs/tags/${version}";
21 hash = "sha256-jsASGYrsH9UNanswX2bZyWS3co/2Y1joaQ98virWcBE=";
22 };
23
24 propagatedBuildInputs = [ numpy moderngl pyglet pillow pyrr glcontext ];
25
26 disabled = !isPy3k;
27
28 # Tests need a display to run.
29 doCheck = false;
30
31 meta = with lib; {
32 homepage = "https://github.com/moderngl/moderngl_window";
33 description = "Cross platform helper library for ModernGL making window creation and resource loading simple";
34 license = licenses.mit;
35 platforms = platforms.linux; # should be mesaPlatforms, darwin build breaks.
36 maintainers = with maintainers; [ c0deaddict ];
37 };
38}