nix-pills
nix-pills copied to clipboard
updated instructions for darwin
I just redid this. @dudebout, since you've been caring about this lately, want to review it?
The change looks good to me.
Why did you not go the cc = stdenv.cc
route @Ericson2314?
Either way, this might need a little note in the text since it introduces some complication in that fairly early pill.
@dudebout I didn't want to use stdenv.cc
because stdenv
hasn't been introduced yet! :)
hostPlatform.isDarwin
also hasn't been introduced, but I hope it's meaning is more easily guessed than stdenv
.
OTOH, gcc does work on Darwin, or at least should...
It's probably better to keep this as straightforward as possible to avoid confusing people. I think adding a footnote saying that this only works on linux for simplicity's sake might be a better idea.
@LnL7 Oh... it's not gcc but binutils that's the problem, right?
I think that using cc = stdenv.cc
with a note explaining it picks the correct C compiler for the platform, gcc for Linux and clang for Darwin, might be easier.
Cross posting here from issue #35. /cc @copumpkin
I don't like the ugliness of the solution; if conditions in derivations to handle platform-specific differences is just kludgy.
It seems that @LnL7 has an alternate theory the the problem is possibly with binutils. I can't comment on that intelligently.
Any help to make these pills work on darwin-nix would be greatly appreciated.
this is old thread, but I just found it.
Regarding @LnL7 comment about making it Linux only, please don't. In many places OS X is used for development and there's often no option to replace it with Linux. Yes, person who wants to use it will find a way, but you don't want to put obstacles in front of person who is not convinced. This is a tutorial most people who read it aren't convinced but are willing to give it a try. Nix is game changing, but has steep learning curve, there shouldn't be an effort to make the curve even steeper.
IMO the solution here is good, and I think what @Ericson2314 suggested is even better, yes stdenv wasn't introduced yet, but a comment could be added that further pills will be covering it and for simplicity can be ignored.