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

WIP: stdenv: always pass --build, --host to configure #87909

Draft
wants to merge 2 commits into
base: staging
from

Conversation

@Gaelan
Copy link
Contributor

@Gaelan Gaelan commented May 15, 2020

Motivation for this change

See #21471 for why this is a good idea. The consensus there seemed to be "go for it," so here's me going for it. This is too big to reasonably test on my laptop, but I imagine this will break some stuff, so it might want to be its own hydra job? I'm not sure how one makes that happen. @edolstra, maybe?

This PR sets configurePlatforms to always default to [ "build" "host" ] in mkDerivation, which was probably the single biggest source of special-casing for cross compiling. However, many individual packages still have special cases; once the dust settles, we should clean those up as well.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
@Gaelan Gaelan requested review from Ericson2314 and matthewbauer as code owners May 15, 2020
@ofborg ofborg bot added the 6.topic: stdenv label May 15, 2020
@Ericson2314
Copy link
Member

@Ericson2314 Ericson2314 commented May 15, 2020

Check out https://github.com/NixOS/nixpkgs/pull/44583/files, which was deemed going too far.

@ofborg ofborg bot requested a review from edolstra May 15, 2020
@Gaelan Gaelan changed the title stdenv: always pass --build, --host to configure WIP: stdenv: always pass --build, --host to configure May 16, 2020
@Gaelan
Copy link
Contributor Author

@Gaelan Gaelan commented May 16, 2020

adding WIP to minimize OfBorg abuse

Gaelan added 2 commits May 15, 2020
Perl currently special-cases cross compiling in a big way, so the build
breaks if we pass build/host when not cross compiling. Eventually, if
possible, we should unify the code paths here.
@Gaelan Gaelan force-pushed the Gaelan:always-cross branch from 8d7dbfd to 9d7b6df May 16, 2020
@Gaelan
Copy link
Contributor Author

@Gaelan Gaelan commented May 16, 2020

With the perl change, this successfully builds stdenv on macOS.

@FRidh FRidh marked this pull request as draft Jun 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.