-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
stdenvBootstrapTools: inherit {cross,local}System #175484
Conversation
It's expected that attributes in the top-level package set will all use that package set, but this wasn't the case for the bootstrap tools. This led some very confusing behaviour: - pkgsMusl.stdenvBootstrapTools would build glibc bootstrap tools - stdenvBootstrapTools was _always_ cross compiled, even if Nixpkgs wasn't, because it always set crossSystem. This also didn't match the behaviour of using make-bootstrap-tools.nix as an entrypoint, where crossSystem would default to null. For the Linux stdenv, I've made the ideal fix, which is to make pkgs an argument rather than taking the arguments for pkgs, and then re-importing it. This means it'll always use exactly the same package set that's calling it, and should also mean faster eval due to not importing Nixpkgs twice. The Darwin stdenv is more complicated, and I'm not able to easily test it, so I wasn't confident in making the same fix there. Instead, I've just made sure crossSystem and localSystem are set to the correct values so they're not always cross compiled and match the parent package set's. It would still be preferable if somebody could make Darwin's make-bootstrap-tools.nix take pkgs as an argument, rather than all the arguments for pkgs.
26e140d
to
c0d69d3
Compare
@ofborg build stdenvBootstrapTools |
Not sure what happened on aarch64-darwin, let's retry. @ofborg build stdenvBootstrapTools |
The I don't think you need to worry about |
@thefloweringash thank you for your insight |
Looks like this PR caused hydra to silentry drop all the |
Description of changes
It's expected that attributes in the top-level package set will all use that package set, but this wasn't the case for the bootstrap tools. This led some very confusing behaviour:
pkgsMusl.stdenvBootstrapTools
would build glibc bootstrap toolsstdenvBootstrapTools
was always cross compiled, even if Nixpkgs wasn't, because it always setcrossSystem
. This also didn't match the behaviour of using make-bootstrap-tools.nix as an entrypoint, wherecrossSystem
would default tonull
.For the Linux stdenv, I've made the ideal fix, which is to make pkgs an argument rather than taking the arguments for pkgs, and then re-importing it. This means it'll always use exactly the same package set that's calling it, and should also mean faster eval due to not importing Nixpkgs twice.
The Darwin stdenv is more complicated, and I'm not able to easily test it, so I wasn't confident in making the same fix there. Instead, I've just made sure
crossSystem
andlocalSystem
are set to the correct values so they're not always cross compiled and match the parent package set's. It would still be preferable if somebody could make Darwin's make-bootstrap-tools.nix take pkgs as an argument, rather than all the arguments for pkgs.Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes