Just brew tap prosody/prosody and then brew install prosody.
brew tap prosody/prosody
brew install prosody