Darwin/macOS 10.12 stdenv updates

I wrote out a little bit what is being updated in macOS stdenv. We don’t have release notes for Nixpkgs, so I think it’s important to try to document this as much possible. The PR that updates the Darwin stdenv is available here:

Some basic highlights of what has been included:

  • Change default LLVM toolchain from 5 to 7. LLVM 5 stdenv is still available through llvmPackages_5.stdenv attribute path.
  • Upgrade Apple SDK from 10.10 to 10.12.
  • Update libSystem symbols from 10.10 (XNU 3789.1.32, Darwin 14.0.0) to 10.12 (XNU 3789.1.32, Darwin 16.0.0).
  • Removed old patches to support old stdenv in Qt 5 and elsewhere.

More details are available at https://matthewbauer.us/blog/darwin-stdenv-update.html

17 Likes

Thank you for all the work you put into this!

1 Like

Thanks for writing this up! I use nixpkgs on my (work-provided) Mac , but I have basically no idea how MacOS is put together (“it’s sort of based on BSD except it’s really based on Mach” is about my limit), so it’s really helpful to have the libSystem stuff (and differences from Linux, which I know a bit better) explained.

As a piece of historical Linux trivia, if you want to run a 1992-era binary on one of today’s Linux machines I think you will probably have to rebuild the kernel and enable CONFIG_BINFMT_AOUT (or add it as a module). Linux switched from a.out executables to ELF in around 1995, and it looks like support for the older format is no longer enabled by default. https://github.com/torvalds/linux/blob/8ea5b2abd07e2280a332bd9c1a7f4dd15b9b6c13/fs/Kconfig.binfmt#L115

1 Like