lib.fixedPoints.toExtension: init#336414
Merged
roberth merged 6 commits intoNixOS:masterfrom Sep 16, 2024
Merged
Conversation
Contributor
Author
|
Result of 1 package blacklisted:
2 packages built:
|
f1cbf18 to
6d85173
Compare
roberth
reviewed
Aug 28, 2024
Member
roberth
left a comment
There was a problem hiding this comment.
Have a few suggestions for the docs, but otherwise LGTM!
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
This makes the type more informative and general - closer to how the function behaves, particularly in isolation. Co-authored-by: Yueh-Shun Li <shamrocklee@posteo.net>
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
Use toExtension from Nixpkgs library instead of the one defined locally.
e3b08c7 to
e31ace5
Compare
12 tasks
Contributor
|
Thanks for this PR, it is a little bit above my league and above my current level of available focus to review it properly, but it looks good and useful. Do you think it'd be possible to use these changes to help with #44426 ? |
roberth
approved these changes
Sep 16, 2024
Member
|
Thank you @ShamrockLee! @doronbehar Yes, it seems like a useful function for that, especially if it needs to support both the arity-1 and arity-2 style overriding like |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description of changes
This function is taken from
stdenv.mkDerivation's implementation ofoverrideAttrs, and acts as atoFunctionanalogy for overlays.Some packages/package sets have an argument in their
overrideinterface to take override functions, which might be anything from a plain attribute set to an overlay. To use the override interface while keeping the previous overriding, one would extend it withlib.composeExtensions, which only accepts overlays.#225051 locally uses a function like this to convert the
overrideModAttrsargument topassthru.overrideModAttrs. The former could be anything to pass to.overrideAttrs, but the latter must be an attribute overlay so that people could override withlib.composeExtension.Other potential use cases include enabling custom overriders such as
overridePythonAttrssupport overlay-style overriding (drv.overridePythonAttrs (finalAttrs: previousPythonAttrs: { ... })), but that is out of the scope of this PR.Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.