-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
lib.fixedPoints.toExtension: init #336414
Conversation
Result of 1 package blacklisted:
2 packages built:
|
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.
Great idea!
f1cbf18
to
6d85173
Compare
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.
Have a few suggestions for the docs, but otherwise LGTM!
Co-authored-by: Robert Hensing <[email protected]>
This makes the type more informative and general - closer to how the function behaves, particularly in isolation. Co-authored-by: Yueh-Shun Li <[email protected]>
Co-authored-by: Robert Hensing <[email protected]>
Use toExtension from Nixpkgs library instead of the one defined locally.
e3b08c7
to
e31ace5
Compare
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 ? |
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 |
Description of changes
This function is taken from
stdenv.mkDerivation
's implementation ofoverrideAttrs
, and acts as atoFunction
analogy for overlays.Some packages/package sets have an argument in their
override
interface 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
overrideModAttrs
argument 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
overridePythonAttrs
support 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 = relaxed
sandbox = true
nix-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.