nix-pills icon indicating copy to clipboard operation
nix-pills copied to clipboard

updated instructions for darwin

Open josh1703658784 opened this issue 7 years ago • 9 comments

josh1703658784 avatar Jan 02 '18 21:01 josh1703658784

I just redid this. @dudebout, since you've been caring about this lately, want to review it?

Ericson2314 avatar Apr 09 '18 03:04 Ericson2314

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 avatar Apr 09 '18 23:04 dudebout

@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.

Ericson2314 avatar Apr 11 '18 21:04 Ericson2314

OTOH, gcc does work on Darwin, or at least should...

Ericson2314 avatar Apr 11 '18 22:04 Ericson2314

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 avatar Apr 11 '18 22:04 LnL7

@LnL7 Oh... it's not gcc but binutils that's the problem, right?

Ericson2314 avatar Apr 11 '18 22:04 Ericson2314

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.

dudebout avatar Apr 12 '18 11:04 dudebout

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.

gurjeet avatar Sep 29 '18 04:09 gurjeet

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.

takeda avatar Dec 27 '19 19:12 takeda