Previously we were relying on LD_LIBRARY_PATH to discover driver libraries (libGL, ligGLX, libEGL, OpenCL and Vulkan). This has the problem that setuid programs (in particular VirtualBox) ignore LD_LIBRARY_PATH. Fix it by setting RUNPATH in various dispatch libraries.
This is not needed for libvdpau because it is already configured to look for libraries in the driver paths.
Fixes https://github.com/NixOS/nixpkgs/issues/22760.
* Implement libGL as a symlink package which uses libraries from libglvnd and
headers from Mesa (since ones from libglvnd are outdated).
* Use libGL_driver.driverLink treewide; add FHS paths where possible.
I updated the erlang esdl lib, added the erlang cl lib,
added opencl-headers and ocl-icd to make wings build and run.
I have not tested its opencl part; I only added dependencies so
it builds.