Skip to content

Define {build,host,target}Platform in stdenv#27179

Merged
Ericson2314 merged 4 commits intoNixOS:masterfrom
obsidiansystems:platforms-from-stdenv
Jul 7, 2017
Merged

Define {build,host,target}Platform in stdenv#27179
Ericson2314 merged 4 commits intoNixOS:masterfrom
obsidiansystems:platforms-from-stdenv

Conversation

@Ericson2314
Copy link
Member

@Ericson2314 Ericson2314 commented Jul 6, 2017

Motivation for this change

See #27069 In particular, make derivation needs to be aware of the target platforms sometimes, and right now it can't be. An alternative would be to make stdenv unaware, but tack on mkDerivation separately so it alone is aware.

This depends on #27045 to be merged first.

Things done

No native hashes are changed. Some cross hashes are changed, but only changed because stdenv.is* properly evaluates to the host platform when cross compiling too.

[I had PR that was supposed to fix that stdenv.is* behavior before, but it only did so natively when hostPlatform == buildPlatform. This partial fix was necessary because meta.platform and it were coupled, and meta.platform still needs to be checked against the build platform until I can audit the packages we cross compile today. Down the road I'll fix those packages, but also teach meta checking that there's 3 platforms, not 1.]

Built the manual locally (along with the other Travis-built derivations for Linux).


CC @vcunat

@mention-bot
Copy link

@Ericson2314, thanks for your PR! By analyzing the history of the files in this pull request, we identified @edolstra, @pikajude, @copumpkin and @LnL7 to be potential reviewers.

@vcunat
Copy link
Member

vcunat commented Jul 7, 2017

Accidental nitpick: the author name in 2314b481e shows as some insane character sequence to me.

@Ericson2314 Ericson2314 force-pushed the platforms-from-stdenv branch from 5a389c1 to 6fd44ab Compare July 7, 2017 16:10
@Ericson2314 Ericson2314 force-pushed the platforms-from-stdenv branch from 6fd44ab to 00fc4fd Compare July 7, 2017 16:16
@Ericson2314
Copy link
Member Author

@vcunat oh hahah, I saw in gitk and assumed it was just a rendering issue. Fixed now.

@vcunat
Copy link
Member

vcunat commented Jul 7, 2017

Now I can't get one XKCD out of my head :-)

@Ericson2314 Ericson2314 force-pushed the platforms-from-stdenv branch from 00fc4fd to 2f2d7ff Compare July 7, 2017 16:45
@Ericson2314 Ericson2314 added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Jul 7, 2017
@Ericson2314 Ericson2314 force-pushed the platforms-from-stdenv branch from 2f2d7ff to a302d73 Compare July 7, 2017 16:55
@Ericson2314
Copy link
Member Author

Ericson2314 commented Jul 7, 2017

Ok, with the doc changes I made, this should be ready. I'm going to hop on the subway, but be very tempted to merge when I got off 😁. Last call, reviewers!

@Ericson2314 Ericson2314 merged commit 89fcb63 into NixOS:master Jul 7, 2017
@Ericson2314 Ericson2314 deleted the platforms-from-stdenv branch July 7, 2017 18:51
{
builder = attrs.realBuilder or stdenv.shell;
args = attrs.args or ["-e" (attrs.builder or ./default-builder.sh)];
inherit stdenv;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This create infinite recursion we can't compute expect.all or ocaml.all

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably not the commit you wished to comment on?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested until that part but yes it might be before because it is a code movement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: cross-compilation Building packages on a different platform than they will be used on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants