1{
2 stdenv,
3 lib,
4 buildPythonPackage,
5 fetchFromGitHub,
6 setuptools,
7 pyopengl,
8 writers,
9 tkinter,
10 pyopengltk,
11}:
12
13buildPythonPackage rec {
14 pname = "pyopengltk";
15 version = "0.0.4";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "jonwright";
20 repo = "pyopengltk";
21 rev = "dbed7b7d01cc5a90fd3e79769259b1dc0894b673"; # there is no tag
22 hash = "sha256-hQoTj8h/L5VZgmq7qgRImLBKZMecrilyir5Ar6ne4S0=";
23 };
24
25 build-system = [ setuptools ];
26
27 dependencies = [
28 pyopengl
29 tkinter
30 ];
31
32 doCheck = false;
33
34 pythonImportsCheck = [ "pyopengltk" ];
35
36 passthru.tests = {
37 cube = writers.writePython3 "cube" {
38 libraries = [ pyopengltk ];
39 doCheck = false;
40 } (builtins.readFile "${src}/examples/cube.py");
41 };
42
43 meta = {
44 description = "OpenGL frame for Python/Tkinter via ctypes and pyopengl";
45 homepage = "https://github.com/jonwright/pyopengltk";
46 maintainers = with lib.maintainers; [ sigmanificient ];
47 license = lib.licenses.mit;
48 # not supported yet, see: https://github.com/jonwright/pyopengltk/issues/12
49 broken = stdenv.hostPlatform.isDarwin;
50 };
51}