didn't apple take bsd and build osx on it without contributing back?
Building xnu from public sources is quite an undertaking. It does still seem to be possible (although it got a lot harder with the x86 transition due to more proprietary drivers). The PureDarwin distribution still seems to be based on the Snow Leopard kernel, I'm not sure why. http://www.puredarwin.org/