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