← Previous · All Episodes
Nix on macOS, nixpkgs for darwin, nix-darwin with Randy Eckenrode Episode 43

Nix on macOS, nixpkgs for darwin, nix-darwin with Randy Eckenrode

· 01:31:35

|
Tracking issue for Darwin stdenv LLVM update:
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.
PR establishing the Darwin team:
https://github.com/NixOS/nixpkgs/pull/348183

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
macOS 15 Sequoia clobbers _nixbld1-4 users:
https://github.com/NixOS/nix/issues/10892

Fixing waifu2x-converter-cpp on Darwin:
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
Darwin SDK PR (has links to my PRs fixing issues):
https://github.com/NixOS/nixpkgs/pull/346043

Discourse post with the SDK update announcement:
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):
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:
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.
Another call for Darwin maintainers:
https://github.com/NixOS/nixpkgs/issues/323144

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

Creators and Guests

Shahar
Host
Shahar "Dawn" Or
Full Time Nix Podcast | Molybdenum Software Show | Software Teaming | open source | Nix | Rust
Randy Eckenrode
Guest
Randy Eckenrode
Member of the darwin-core team in nixpkgs

Subscribe

Listen to Full Time Nix using one of many popular podcasting apps or directories.

Apple Podcasts Spotify Overcast Pocket Casts Amazon Music
← Previous · All Episodes