
Nix on macOS, nixpkgs for darwin, nix-darwin with Randy Eckenrode
Tracking issue for Darwin stdenv LLVM update:
https://github.com/NixOS/nixpkgs/issues/234710
https://github.com/NixOS/nixpkgs/issues/234710
I’d also credit reno and emilazy for driving the LLVM 19 upgrade. They used a few patches from a WIP Clang 18 branch I’d started over the summer, but they pushed the update over the finish line once breaking changes were allowed after the 24.11 release.
MacVim in nixpkgs:
https://github.com/NixOS/nixpkgs/blob/50784a2835c150d6055861a5ad703a57b8070cbb/pkgs/applications/editors/vim/macvim.nix
https://github.com/NixOS/nixpkgs/blob/50784a2835c150d6055861a5ad703a57b8070cbb/pkgs/applications/editors/vim/macvim.nix
https://github.com/orgs/NixOS/teams/darwin-core
https://github.com/reckenrode
https://github.com/emilazy
https://github.com/toonn
https://github.com/reckenrode
https://github.com/emilazy
https://github.com/toonn
when Apple implemented this hardening, before it just happened to work. So, and this actually affected Nix because Nix uses the AWS C++ SDK and that stopped building
https://github.com/NixOS/nixpkgs/pull/265102
Fixing waifu2x-converter-cpp on Darwin:
https://github.com/NixOS/nixpkgs/pull/135725
https://github.com/NixOS/nixpkgs/pull/135725
Though it turns out my actually first nixpkgs PR was fixing vscode-lldb on Darwin:
https://github.com/NixOS/nixpkgs/pull/131324
Last year, Connor Baker created a draft PR to add the missing SDK.
Connor Baker’s draft PR adding more SDKs:
https://github.com/NixOS/nixpkgs/pull/229210
Discourse post with the SDK update announcement:
https://discourse.nixos.org/t/the-darwin-sdks-have-been-updated/55295
https://discourse.nixos.org/t/the-darwin-sdks-have-been-updated/55295
Here’s that list (by GitHub id). These people were all very helpful with ensuring these Darwin improvements made it to master.staging-next with the clang 16 update (tried to get everyone who contributed during that cycle; appologies if I missed anyone):
- Atemu
- anthonyroussel
- azuwis
- boltzmannrain
- emilytrau
- josephst
- judofyr
- mfrischknech
- philiptaron
- toonn
- trofi
- wegank
Darwin SDK update. It turns out that in spite of radically changing the pattern, providing an SDK by default tends to just work.
I also want to thank midchildan for contributing fixes to xcbuild to address some of the post-release issues users have encountered with having it in a dev shell by default. I also wanted to call out the great work getting Zed and Firefox building on Darwin with these SDK changes:
- niklaskorz (for Zed)
- booxter (for Firefox)
Note that the source for ld-prime is actually removed from the distribution. I’d package it if it were there, but it’s not.
Generated chapters:
00:00 Introduction to Nix on macOS
02:09 Understanding Darwin and Nixpkgs
04:00 Differences Between macOS and Linux
06:40 Challenges in Nix Package Management on macOS
08:56 Building and Compiling on Darwin
11:06 Compatibility Issues with C/C++ Programs
13:17 Intervention and Limitations in Package Building
15:05 Legal Constraints and Package Management
17:32 Technical Challenges in Nix on macOS
19:49 User Experience and Community Contributions
21:36 CI and Building Packages on macOS
23:52 Understanding Sandboxing Limitations
29:12 Challenges with macOS Updates
34:11 The Appeal of Nix on macOS
36:03 Contributions to nix-darwin
43:11 Navigating SDK Changes in Nix
48:13 Rust
49:47 The Challenge of SDK Frameworks
51:48 Transitive Dependencies and Compatibility Issues
53:50 Creating a Native SDK Experience
56:15 Benefits for Linux and Cross Compilation
57:54 Limitations of Cross Compilation on Darwin
01:01:08 Source Releases
01:10:06 nix-darwin: Managing macOS with Nix
01:13:29 Managing macOS Defaults with nix-darwin
01:18:30 The Power of home-manager in nix-darwin
01:19:31 Contributing to the nix-darwin Community
01:24:00 Building a Robust CI for darwin
01:26:25 Integrating Homebrew with nix-darwin
02:09 Understanding Darwin and Nixpkgs
04:00 Differences Between macOS and Linux
06:40 Challenges in Nix Package Management on macOS
08:56 Building and Compiling on Darwin
11:06 Compatibility Issues with C/C++ Programs
13:17 Intervention and Limitations in Package Building
15:05 Legal Constraints and Package Management
17:32 Technical Challenges in Nix on macOS
19:49 User Experience and Community Contributions
21:36 CI and Building Packages on macOS
23:52 Understanding Sandboxing Limitations
29:12 Challenges with macOS Updates
34:11 The Appeal of Nix on macOS
36:03 Contributions to nix-darwin
43:11 Navigating SDK Changes in Nix
48:13 Rust
49:47 The Challenge of SDK Frameworks
51:48 Transitive Dependencies and Compatibility Issues
53:50 Creating a Native SDK Experience
56:15 Benefits for Linux and Cross Compilation
57:54 Limitations of Cross Compilation on Darwin
01:01:08 Source Releases
01:10:06 nix-darwin: Managing macOS with Nix
01:13:29 Managing macOS Defaults with nix-darwin
01:18:30 The Power of home-manager in nix-darwin
01:19:31 Contributing to the nix-darwin Community
01:24:00 Building a Robust CI for darwin
01:26:25 Integrating Homebrew with nix-darwin
Creators and Guests

Host
Shahar "Dawn" Or
Doing a Nix podcast | making public entire sessions of synchronous collaboration on open source software | rustacean