NixOS mostly does a good job avoiding application breakage on updates by always keeping exact instances of all runtime dependencies which they had been built against, but OpenGL is another thing. I’ve noticed that OpenGL applications which are installed in user profile break after system upgrade, failing to start because updated OpenGL library can’t work with glibc instance which the application was built against, e. g.:
libGL: dlopen /run/opengl-driver/lib/dri/r600_dri.so failed (/nix/store/hwwqshlmazzjzj7yhrkyjydxamvvkfd3-glibc-2.26-131/lib/libm.so.6: versionGLIBC_2.27’ not found (required by /run/opengl-driver/lib/dri/r600_dri.so))`
It seems that /run/opengl-driver is symlink to opengl-drivers store path which is only referred by nixos-system path and not a single application. Had it been installed as application dependency, the instance which broken application had been built against would still be present and it would run. So why had NixOS crew taken decision to do it another way?