python.pkgs.pyglet: Fix missing libraries

Add the paths for Xext, fontconfig and freetype to the hardcoded library
paths in load_library.
This commit is contained in:
Philip Kranz 2019-10-11 09:15:42 +02:00 committed by Frederik Rietdijk
parent 7354d72c19
commit fa2909bf51

View file

@ -8,6 +8,8 @@
, glibc
, gtk2-x11
, gdk-pixbuf
, fontconfig
, freetype
}:
buildPythonPackage rec {
@ -45,6 +47,10 @@ buildPythonPackage rec {
path = '${gdk-pixbuf}/lib/libgdk_pixbuf-2.0${ext}'
elif name == 'Xext':
path = '${xorg.libXext}/lib/libXext${ext}'
elif name == 'fontconfig':
path = '${fontconfig.lib}/lib/libfontconfig${ext}'
elif name == 'freetype':
path = '${freetype}/lib/libfreetype${ext}'
if path is not None:
return ctypes.cdll.LoadLibrary(path)
raise Exception("Could not load library {}".format(names))