-
-
Notifications
You must be signed in to change notification settings - Fork 15.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
buildRustPackage: support fixed-point arguments via lib.extendMkDerivation #382550
Conversation
|
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.
LGTM!
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.
LGTM, looking forward to
This PR doesn't address the existing overriding issues of the buildRustPackage arguments (such as
cargoHash
). They will be addressed in subsequent PRs with the help offinalAttrs
I guess such a PR will be rather similar to what is done in #194475/#354999, maybe they could even be rebased on top of this PR (but it might be easier to just do it from scratch).
Move assertions down to the corresponding attribute value. Avoid adding assertions to the whole argument set.
Support fixed-point arguments with lib.extendMkDerivation Postpone formatting for more concise diff.
c5a2020
to
31e261a
Compare
Rebased on top of |
Inspired from NixOS#382550 Context: NixOS#234651
Inspired from NixOS#382550 Context: NixOS#234651
…poserProject2` Inspired from NixOS#382550 Context: NixOS#234651
…erVendor` Inspired from NixOS#382550 Context: NixOS#234651
Do you think that this could/should be backported? (EDIT: Thank you for this great work!) |
The changes are backward-compatible, but it requires backporting |
My question was motivated by a specific backport. But I get that backporting this would require a significant effort. |
That sounds like a good evidence supporting the backport.
The PRs needed for this to get backported include:
And the reformatting commits should be re-do manually by running the corresponding versions of nixfmt instead of direct cherry-picking to avoid bringing unwanted changes to the release branch. IMO, the technical part is not very challenging. Maybe we could start from #234651 and see how the library people would think about it. |
This PR enables
buildRustPackage
to takefinalAttrs: { ... }
with the help oflib.extendMkDerivation
introduced in #234651.The large diff block is due to indentation changes, while the effective diff is minimal. Commit-by-commit review would be much easier.
I cherry-picked the
uiua
package transition from #354999 to validate the implementation. Other transition examples in #194475 and #354999 seems no longer relevant.This PR doesn't address the existing overriding issues of the
buildRustPackage
arguments (such ascargoHash
). They will be addressed in subsequent PRs with the help offinalAttrs
, just like #225051 and #379602.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.