Conversation
|
@domenkozar wow, I didn't know nix.dev covered cross-compilation, thanks! Recently heard the podcast as well :) |
It's quite recent, added yesterday :) Great work with these changes! Looks good to me. |
|
@ianthehenry I saw you mentioned the cross-compilation section of Nixpkgs in your blog post, I agree the way the section is currently structured is confusing as well and I only managed to make heads or tails of it from various sources online by @matthewbauer, discussions with @Ericson2314 and diving head-first into adding cross-compilation support for a few new targets. Would appreciate any suggestions and/or feedback in this WIP PR. You also may want to check out the nix.dev tutorial on cross-compilation. This section is poignant:
|
|
@ianthehenry I also highly recommend you join our Matrix channels so you can see what the community is up to and ask questions when they arise. |
|
@siraben You may have seen this post already, but just in case: the first and most confusing explanation of cross-compilation in the manual is actually in Chapter 6. Trying to read that section was the primary source of my frustration in the summary (ctrl-F "offset"). The actual cross-compilation chapter made better reading, for the most part, although the section on bootstrapping completely lost me. That said, I admire any effort to clarify it, and I think the changes you've made so far certainly do increase the legibility a bit. For me I think that a concrete example would be very helpful -- I tried to cross-compile a trivial package and was unable to. I don't know if I was doing something completely wrong, if I just got unlucky, if Linux is not a reasonable target platform, or what. (I expect that cross-compilation mostly exists for microcontrollers, but that's harder for someone like me (who just wants to see how it works) to experiment with.) |
b99535b to
5233112
Compare
7767b2d to
04ba794
Compare
There are tons of use cases for cross-compilation. Here are two that you might not have noticed:
There is a proposal (#21471) to make all compiles be cross-compiles, in order to avoid having two separate codepaths for every package. Even if you don't use cross-compilation, planning for it helps clarify build-time/run-time distinctions quite a bit. |
|
Still think it's valuable to update cross-compilation updates, but might not have time this summer to get around to the whole thing... |
|
Maybe we can merge it as-is and incrementally do some of the suggestions at a later PR? |
6aac571 to
dc33828
Compare
Mindavi
left a comment
There was a problem hiding this comment.
If the checks pass we can merge this, I think.
|
Why did the manual fail to build? |
|
The check says something about cross-qa-emulation not being referenced. Maybe it should be in some index somewhere? |
|
Yes, cross-qa-emulation needs to go in |
|
The doc/README.md suggests that thet Nixpkgs Reference Manual should only contain reference documentation in terms of the Diátaxis framework, and how-to guides should go to the nix.dev project instead. |
Motivation for this change
I want this to be an interactive process with the community. Cross-compilation is one of Nixpkgs' greatest strengths, but the docs do not do it justice. In particular:
WIP for now
Things done
sandboxinnix.confon non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)