{ stdenv , buildPythonPackage , fetchPypi , libGL , libGLU , xorg , future , pytest , glibc , gtk2-x11 , gdk-pixbuf , fontconfig , freetype }: buildPythonPackage rec { version = "1.4.2"; pname = "pyglet"; src = fetchPypi { inherit pname version; sha256 = "1dxxrl4nc7xh3aai1clgzvk48bvd35r7ksirsddz0mwhx7jmm8px"; }; # find_library doesn't reliably work with nix (https://github.com/NixOS/nixpkgs/issues/7307). # Even naively searching `LD_LIBRARY_PATH` won't work since `libc.so` is a linker script and # ctypes.cdll.LoadLibrary cannot deal with those. Therefore, just hardcode the paths to the # necessary libraries. postPatch = let ext = stdenv.hostPlatform.extensions.sharedLibrary; in '' cat > pyglet/lib.py <