pythonPackages.pyopengl: fix build

This commit is contained in:
Josef Kemetmüller 2018-05-06 14:06:15 +02:00
parent 8ce802e8c8
commit f92cf4b93f

View file

@ -11567,11 +11567,15 @@ in {
sha256 = "9b47c5c3a094fa518ca88aeed35ae75834d53e4285512c61879f67a48c94ddaf";
};
propagatedBuildInputs = [ pkgs.libGLU_combined pkgs.freeglut self.pillow ];
patchPhase = ''
sed -i "s|util.find_library( name )|name|" OpenGL/platform/ctypesloader.py
sed -i "s|'GL',|'libGL.so',|" OpenGL/platform/glx.py
sed -i "s|'GLU',|'${pkgs.libGLU_combined}/lib/libGLU.so',|" OpenGL/platform/glx.py
sed -i "s|'glut',|'${pkgs.freeglut}/lib/libglut.so',|" OpenGL/platform/glx.py
patchPhase = let
ext = stdenv.hostPlatform.extensions.sharedLibrary; in ''
substituteInPlace OpenGL/platform/glx.py \
--replace "'GL'" "'${pkgs.libGL}/lib/libGL${ext}'" \
--replace "'GLU'" "'${pkgs.libGLU}/lib/libGLU${ext}'" \
--replace "'glut'" "'${pkgs.freeglut}/lib/libglut${ext}'"
substituteInPlace OpenGL/platform/darwin.py \
--replace "'OpenGL'" "'${pkgs.libGL}/lib/libGL${ext}'" \
--replace "'GLUT'" "'${pkgs.freeglut}/lib/libglut${ext}'"
'';
meta = {
homepage = http://pyopengl.sourceforge.net/;