Hi everyone,
I’m working on setting up my Macbook for mobile app development with Expo, and I’m looking for some guidance on the best practices, especially when using devenv.
My current setup involves manually installing some tools outside of Nix:
- Xcode Command Line Tools: Installed using
xcode-select --install. - Xcode: Installed via
mas. - I am not installing anything from this list of Xcode packages on myNixos.
With this initial setup, things seem to be working fine for the most part. My first question is: Is this a reasonable approach, or are there better recommendations for managing Xcode and its command-line tools in a Nix-Darwin context?
Next, I’m trying to integrate devenv into my workflow, and I’ve hit a couple of snags.
The first issue I encountered was related to an incorrect clang version within the devenv shell. I was able to resolve this by following the advice in this discourse post and using stdenvNoCC in my devenv.yaml configuration.
My second question related to this is: Is using stdenvNoCC the recommended way to handle this clang conflict?
After fixing the clang issue, I ran into this problem. It feels like a configuration issue on my end, although I have created an issue. Basically, the issue is that the tools installed in my default shell are not available in the devenv environment (it resolves its own thing inside).
I’ve researched this topic and have found some related threads like:
- MacOS SDK, Xcode on Nix Darwin Reoccurance
- Nix-darwin: override/overlay xcode + how to get a correct/working dev/build environment?
- MacOS SDK, Xcode on Nix Darwin
However, I haven’t found a clear and reliable solution that addresses this.
So, my third and final question is: What are the recommended practices for setting up devenv on Nix-Darwin when command-line tools and Xcode are required for development? How can I ensure that my default shell tools are accessible within the devenv environment, or is there a better approach to this?
Any insights or suggestions would be greatly appreciated! Thanks in advance.
P.S. If anyone knows of any good documentation or resources that outline a recommended or best-practice approach for this setup, I’d be very grateful if you could share them!