Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of crossAttrs #33302

Closed
Ericson2314 opened this issue Jan 1, 2018 · 2 comments
Closed

Get rid of crossAttrs #33302

Ericson2314 opened this issue Jan 1, 2018 · 2 comments
Assignees
Labels
6.topic: cross-compilation Building packages on a different platform than they will be used on
Milestone

Comments

@Ericson2314
Copy link
Member

It is a needless abstraction. Just use stdenv.lib.optionalAttrs (stdenv.hostPlatform != buildPlatform) { .. }, or more ideally condition on the individual fields.

CC @bgamari

@Ericson2314 Ericson2314 added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Jan 1, 2018
@Ericson2314 Ericson2314 added this to the 18.03 milestone Jan 1, 2018
@Ericson2314 Ericson2314 self-assigned this Jan 1, 2018
@matthewbauer matthewbauer modified the milestones: 18.03, 18.09 Apr 17, 2018
Ericson2314 added a commit to obsidiansystems/nixpkgs that referenced this issue May 15, 2018
It turns out none of this stuff is needed. The docs aren't evenly built
properly anyways so the build trivially succeeds either way, due to what
looks like upstream misunderstanding automake. If I try to build the
docs manually in a cross shell (before and after this change), there's a
make rule error such that some HTML files aren't even attempted to be
built and then a copy fails.

Even if this was all fixed, these been a good number of cross fixes
upstream getting them to use CC_FOR_BUILD and other good stuff, so I
doubt such hacks would be needed.

Progress towards NixOS#40531 and NixOS#33302.
Ericson2314 added a commit to Ericson2314/nixpkgs that referenced this issue Jul 25, 2018
@matthewbauer
Copy link
Member

Do you have a plan to get rid of crossDrv and nativeDrv too?

@Ericson2314
Copy link
Member Author

Hmm I forgot about that. I usually think of getting rid of all splicing, which is the sole reason those exist, but that's a lot harder. Just renaming those to match the others is a good first step.

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

No branches or pull requests

2 participants