It can coexist, but note that there’s also a driver bug where the platform library order got flipped around. It went unnoticed before since there was only ever one library to match, but with two of them now, our current drivers will use 10_nvidia_wayland.json before 09_nvidia_wayland2.json.
We should have that fixed in our next release, but in the meantime, you can set an environment variable to make the driver load one or the other:
__EGL_EXTERNAL_PLATFORM_CONFIG_FILENAMES=/usr/share/egl/egl_external_platform.d/09_nvidia_wayland2.json
If you prefer to keep /usr/lib clean, then you can also skip the install step for egl-wayland2, and just point at wherever you compiled it:
__EGL_EXTERNAL_PLATFORM_CONFIG_FILENAMES=/path/to/egl-wayland2/src/wayland/09_nvidia_wayland2.json \
LD_LIBRARY_PATH=/path/to/egl-wayland2/build/src/wayland \
COMMAND...