To be more specific, darwin was originally based on BSD4.4-lite2 and FreeBSD with the Mach hybrid microkernel. It has diverged significantly since with lots of new APIs in userland, but all major BSD apis are still there - it is still a POSIX compliant system