For the past couple of years, Darwin has been a first-class "pure" platform on Nix. In this talk I'll describe the many hurdles we've had to overcome to get from an impure poorly supported platform to where we are today. I'll also cover ongoing pain points and where we see the platform going, and why I think it should take over the Mac packaging ecosystem. When I first encountered Nix, I was simultaneously impressed by the purity of its Linux environment with virtually no untracked external dependencies, and disappointed with the situation on macOS. On macOS, some of my first experiences with Nix involved some painful surprises of impurities breaking my Nix builds, and my early attempts to fix them largely failed. As I tinkered with Nix and spoke to experts online, a clearer picture emerged for how to move from the impure situation to a pure one, and a few of us banded together on IRC over the following few months to bootstrap a pure compiler toolchain and OS-appropriate SDK from scratch. It's a grueling story of mass rebuilds multiple times a day, repeatedly waiting for three hours just to find stupid typos, and hunting down undesired dependency chains, but in the end it came together and actually worked, much to everyone's surprise. Although the situation is now far better than it was, there is still much work to do, and I'll go over some of the root causes of much of the remaining pain and how I propose to tackle it. I'll also go over some exciting recent developments in the macOS Nix space and what I think the project and platform will look like in the longer term. |