Include nixGL in nix flake app

On nixos, a special path /run/opengl-driver/lib is needed, as that’s where hardware acceleration libraries are installed.

On non-NixOS systems, linking it to where you would find other graphics libraries might be enough… Although you may have issues as it looks like addOpenGLRunpath hooks prepends it to the rpath:

patchelf --set-rpath "@driverLink@/lib:$origRpath" ${forceRpath:+--force-rpath} "$file"

It might be safer to selectively symlink only the hardware libraries which are needed, which nixGL might be doing (or a similar approach).

Use of LD_LIBRARY_PATH , will likely cause a lot of abi issues; so I would avoid using it, although it would be a quick and dirty hack to change linking behavior.

Related: RFC 121 and nixpkgs #158079