blob: 01a52597e302975bf10582bc441c481243269363 (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
libGL,
libX11,
}:
buildPythonPackage rec {
pname = "glcontext";
version = "3.0.0";
pyproject = true;
src = fetchFromGitHub {
owner = "moderngl";
repo = "glcontext";
tag = version;
hash = "sha256-GC2sb6xQjg99xLcXSynLOOyyqNwCHZwZqrs9RZh99pY=";
};
build-system = [ setuptools ];
buildInputs = [
libGL
libX11
];
postPatch = ''
substituteInPlace glcontext/x11.cpp \
--replace-fail '"libGL.so"' '"${libGL}/lib/libGL.so"' \
--replace-fail '"libX11.so"' '"${libX11}/lib/libX11.so"'
substituteInPlace glcontext/egl.cpp \
--replace-fail '"libGL.so"' '"${libGL}/lib/libGL.so"' \
--replace-fail '"libEGL.so"' '"${libGL}/lib/libEGL.so"'
'';
# Tests fail because they try to open display. See
# https://github.com/NixOS/nixpkgs/pull/121439
# for details.
doCheck = false;
pythonImportsCheck = [ "glcontext" ];
meta = with lib; {
homepage = "https://github.com/moderngl/glcontext";
description = "OpenGL implementation for ModernGL";
license = licenses.mit;
platforms = platforms.linux;
maintainers = [ ];
};
}
|