I "upgraded" from Snow Leopard with Homebrew and vim both chugging along happily, to Lion. Now vim hangs/segfaults, and when I invoke brew, it complains xcode is missing, and continues to do so after downloading Xcode from the app store. I wanted to install vim from source, but that requires Mercurial, which I may be able to use to create a tarball from a Linux virtual machine, but overall Unix-like functionality is broken on Lion.
How can I get Unix acting like Unix under Lion?