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
darwin-stdenv: bootstrap with python3 #77610
Conversation
configd = null; | ||
}; | ||
python2 = self.python; | ||
python3 = super.python3Minimal; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@FRidh This used to be a separate (minimal) copy to make python updates easier, would you like me to do the same for python3?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Darwin has pkgs/development/interpreters/python/cpython/2.7/boot.nix
which is now removed. If you think you need that for Python 3, then yes, you can create it. Maybe you can indeed use python3Minimal
? Note that was added by @adisbladis and serves a different purpose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strictly speaking it's not necessary. But otherwise changing anything anything that's not version guarded, like the setup-hook, will also change this. Causing a full stdenv rebuild which can be pretty awkward.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not often we change the Python 3 expression, and when we do it goes to staging. Anyway, it's up to you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah the python2 boot thing was more of a hack than anything. I actually thought it had to do with needing configd for cpython, which looks like is no longer necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll leave as is for now, we can always add that later if it's a problem.
- Replaced python override from the final stdenv, instead we propagate our bootstrap python to stage4 and override both CF and xnu to use it. - Removed CF argument from python interpreters, this is redundant since it's not overidden anymore. - Inherit CF from stage4, making it the same as the stdenv.
b347fde
to
c05efed
Compare
Most of the clang builds finished so this is probably fine. |
Motivation for this change
With python2 EOL many packages have been switched to python3 by default, but anything that's part of the darwin stdenv couldn't be switched without introducing 2 python versions during bootstrapping.
Also resolves part of #77535.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)/cc @NixOS/darwin-maintainers