Define {build,host,target}Platform in stdenv#27179
Conversation
|
@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. |
46a54b6 to
5a389c1
Compare
|
Accidental nitpick: the author name in 2314b481e shows as some insane character sequence to me. |
5a389c1 to
6fd44ab
Compare
Something more elaborate is needed for the "*Platform" arguments.
6fd44ab to
00fc4fd
Compare
|
@vcunat oh hahah, I saw in |
|
Now I can't get one XKCD out of my head :-) |
00fc4fd to
2f2d7ff
Compare
See NixOS#27069 for a discussion of this
2f2d7ff to
a302d73
Compare
|
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! |
| { | ||
| builder = attrs.realBuilder or stdenv.shell; | ||
| args = attrs.args or ["-e" (attrs.builder or ./default-builder.sh)]; | ||
| inherit stdenv; |
There was a problem hiding this comment.
This create infinite recursion we can't compute expect.all or ocaml.all
There was a problem hiding this comment.
This is probably not the commit you wished to comment on?
There was a problem hiding this comment.
I tested until that part but yes it might be before because it is a code movement.
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
mkDerivationseparately 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 whenhostPlatform == buildPlatform. This partial fix was necessary becausemeta.platformand it were coupled, andmeta.platformstill 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