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

stdenvBootstrapTools: inherit {cross,local}System #175484

Merged
merged 1 commit into from
May 31, 2022

Commits on May 30, 2022

  1. stdenvBootstrapTools: inherit {cross,local}System

    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.
    alyssais committed May 30, 2022
    Configuration menu
    Copy the full SHA
    c0d69d3 View commit details
    Browse the repository at this point in the history