[Nix-dev] Planned Changes for Darwin Users

shea at shealevy.com shea at shealevy.com
Thu Sep 1 21:45:46 CEST 2011


Hi all,

I thought I'd let everyone know the darwin-specific changes I'm working on
so that interested users can comment, contribute, observe, and prepare.

The near-term goal is to get a usable nix/nixpkgs without depending on
xcode. That requires completing four tasks:

1. Packaging a binary distribution of nix and making it available on
hydra. It's easy to do this if we assume the files will end up in the /usr
hierarchy, but if we want more versatility it's relatively straightforward
to write a script that will let the end-user set all the relevant
directories at install time, especially if we can build nix statically
linked. This is on hold until the rest is complete.

2. Getting all of the needed Xcode tools that Apple has open-sourced [0]
building on darwin. I've successfully gotten cctools compiled, my next
step is to build ld64. ld64 is an xcode project, though, and xcodebuild
isn't open-sourced, so this is on hold until the next step has made
progress. My current expectation is that cctools, ld64, and the
already-packaged gcc should be enough to remove the dependence on Xcode.

3. Finding or making replacements for all the needed Xcode tools that
Apple hasn't open-sourced. I'm currently working on a tool called
xcode2nix to make nix expressions from xcode projects. The application
project is at https://github.com/shlevy/xcode2nix and the library it
depends on is at https://github.com/shlevy/xcode-types. I will be
uploading these to hackage and adding them to nixpkgs when they are
workable. I don't know of any other required toolchain package that isn't
open-sourced.

4. Creating a bootstrap tarball from nix-built tools to bootstrap stdenv
on darwin without relying on xcode tools at any point in the chain.

My longer-term goals include:

1. Achieving stdenv purity on-par with the Linux stdenv. This will
ultimately depend on how many of the requisite projects are open-sourced
by Apple, but at the very least we'll be able to remove the dependency on
the system libc, as Apple has open-sourced that.

2. Getting as many of the Apple open source projects to build on nixpkgs
as possible. If we can get enough of them, maybe someday there will be a
NixOSX ;)

Hope this was interesting to some of you at least!

Cheers,
Shea

[0]: http://www.opensource.apple.com/source/




More information about the nix-dev mailing list