Sorry, I know I’m reviving a dead thread, but for any future people trying to solve the same problem, the more idiomatic way is to use lib.makeLibraryPath, eg, in your case
devShells.${system}.default = pkgs.mkShell {
BuildInputs = with pkgs; [
glfw-wayland
];
nativeBuildInputs = [
zigMaster
];
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath (with pkgs; [
wayland
# any other libraries that need to be dynamically linked to
]);
};