Using Nix flake for setting up the development environment. Followed the instuctions from raylib docs The flake.nix file and the command to build raylib are different because I'm on wayland but the instruction above are for x11. This helped with building raylib for wayland.
In your project root, run the following instructions:
mkdir external
wget https://github.com/raysan5/raylib/archive/refs/tags/5.5.tar.gz -P external/
tar xvf external/5.5.tar.gz -C external/Use direnv or run nix develop.
Finally build raylib
cd external/raylib-5.5/src/
make PLATFORM=PLATFORM_DESKTOP GLFW_LINUX_ENABLE_WAYLAND=TRUE