Can I use Nix to build Swift packages on macOS?

Has anyone built any tools written in Swift using Nix on macOS? Nixpkgs has a swift package but it’s marked as Linux-only. Now that my team is using Nix to satisfy our build-time dependencies, I’m struggling to figure out how to add https://github.com/ChargePoint/xcparse to our dependencies without throwing purity out the window and calling out to /usr/bin/swift.

4 Likes

Were you able to figure this out?

Unfortunately not. I ended up leaving that job before coming up with a solution and have not needed this since.