mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-23 20:44:12 +00:00
python312Packages.glcontext: refactor
This commit is contained in:
parent
ce2cf87cb3
commit
2ac7beeace
@ -2,7 +2,7 @@
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
isPy3k,
|
||||
setuptools,
|
||||
libGL,
|
||||
libX11,
|
||||
}:
|
||||
@ -10,16 +10,16 @@
|
||||
buildPythonPackage rec {
|
||||
pname = "glcontext";
|
||||
version = "3.0.0";
|
||||
format = "setuptools";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "moderngl";
|
||||
repo = pname;
|
||||
repo = "glcontext";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-GC2sb6xQjg99xLcXSynLOOyyqNwCHZwZqrs9RZh99pY=";
|
||||
};
|
||||
|
||||
disabled = !isPy3k;
|
||||
build-system = [ setuptools ];
|
||||
|
||||
buildInputs = [
|
||||
libGL
|
||||
@ -28,11 +28,11 @@ buildPythonPackage rec {
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace glcontext/x11.cpp \
|
||||
--replace '"libGL.so"' '"${libGL}/lib/libGL.so"' \
|
||||
--replace '"libX11.so"' '"${libX11}/lib/libX11.so"'
|
||||
--replace-fail '"libGL.so"' '"${libGL}/lib/libGL.so"' \
|
||||
--replace-fail '"libX11.so"' '"${libX11}/lib/libX11.so"'
|
||||
substituteInPlace glcontext/egl.cpp \
|
||||
--replace '"libGL.so"' '"${libGL}/lib/libGL.so"' \
|
||||
--replace '"libEGL.so"' '"${libGL}/lib/libEGL.so"'
|
||||
--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
|
||||
|
Loading…
Reference in New Issue
Block a user