OpenGL
OpenGL must break purity due to the need for hardware-specific linkage. Intel, AMD, and Nvidia will have different libraries for example. On NixOS, these libraries are mounted at
/run/opengl-driver/lib
and
/run/opengl-driver-32/lib
When a program is installed in your environment, these libraries should be found automatically. However, this is not the case in a `nix-shell`. To fix, add this line to your shell.nix:
LD_LIBRARY_PATH="/run/opengl-driver/lib:/run/opengl-driver-32/lib";