-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
overlays: (partially) recursive merge #54266
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7996,8 +7996,11 @@ in | |
python37Full = python37.override{x11Support=true;}; | ||
|
||
# pythonPackages further below, but assigned here because they need to be in sync | ||
_merge_pythonPackages = true; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. camelCase please. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤔 this isn't a package, so it shouldn't follow package naming guidelines. This is an attribute lifted out of it's attribute set to prevent evaluations. Maybe There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We are more often use camelCase for functions then for packages. |
||
pythonPackages = python.pkgs; | ||
_merge_python2Packages = true; | ||
python2Packages = python2.pkgs; | ||
_merge_python3Packages = true; | ||
python3Packages = python3.pkgs; | ||
|
||
pythonInterpreters = callPackage ./../development/interpreters/python {}; | ||
|
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.
Could we have a function instead similar to
recurseIntoAttrs
instead of this top-level attributes?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.
but then we have to define all sets in one place (in that function), right? In my implementation it is possible to hijack anything from overlay, without the need to extend function.
But maybe you can show an example of what you expect that "merge-approve" function should look like
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 mean something like:
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.
Unfortunately it is not possible, because it requires evaluate.of all attributes (we want to know which attributes are sets, and which of those have
mergeInOverlays
sub-attribute).And some of our attributes rely on tying the knot, so we don't want to evaluate them too soon.
In particular,
wrapBintoolsWith
evaluation relies onstdenv
, which itself relies onbinutils
, which relies onwrapBintoolsWith
... I couldn't make it play.