Getting an error, has anything regarding OpenGL in nixpkgs?

IIRC some older nixpkgs builds might stop finding GL libs without LD_LIBRARY_PATH. Relatively recent builds should be OK.