-
-
Notifications
You must be signed in to change notification settings - Fork 14k
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
Add pkgs.callOverlay function #180557
Closed
gytis-ivaskevicius
wants to merge
4
commits into
NixOS:master
from
gytis-ivaskevicius:add-eval-overlay-fn
Closed
Add pkgs.callOverlay function #180557
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
10e0ac7
Add pkgs.callOverlay and pkgs.callOverlays funcitons
gytis-ivaskevicius 879591c
Improve pkgs.callOverlay performance
gytis-ivaskevicius 9e7c795
Fix 'pkgs.callOverlay' docs
gytis-ivaskevicius 8babe0e
Fix 'pkgs.callOverlay' docs
gytis-ivaskevicius File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
What about the other package sets like
pkgsStatic
or the cross ones?As a general rule, overriding can not be added externally like you're attempting here. It needs to be integrated in the original structure because of all the possible recursive definitions. In other words, this needs changes in
top-level/stage.nix
in order to work well.We haven't even made
pkg.override
work entirely correctly with cross splicing andoverrideAttrs
yet, and this change has a lot in common with a new "pkg.override".For this functionality to not be another series of bugs like we've had with overriding, we need better support for sub-packagesets in
stage.nix
.One idea is to make its
nixpkgsFun
overridable, although that might re-evaluate too much. Another is to put all the extra package sets in their own overlay, so that not justpkgs
but all the package sets are easily modifiable.Here's the general idea. It probably contains some mistakes, but it conveys the idea better than English.
extend
should probably be defined similarly, but ignore thesuper
argument ofwrapPackageSet
.I think there's also a possibility of allowing actual overlays to extend the
otherPackageSets
function, but I'm not sure and that's over-engineering it for the first design step, but it would fix another problem. First priority would be to make something like the above work.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.
NB this still doesn't cover interactions between
extend
andcallOverlay
.Also how about
affixOverlay
orattachOverlay
? They're not properly merged into self like an overlay normally would, so I think it would be good to add an appropriate verb.extend
already doesn't really suggest merging, so I tried to think of something that is even less "merge"-like.EDIT: add "into self"
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.
related? https://github.com/nixpkgs-architecture/issues/issues/21