buildRustPackage: add overrideRust attribute#288430
Closed
9999years wants to merge 1 commit intoNixOS:masterfrom
Closed
buildRustPackage: add overrideRust attribute#2884309999years wants to merge 1 commit intoNixOS:masterfrom
9999years wants to merge 1 commit intoNixOS:masterfrom
Conversation
Member
|
Functionality-wise, this looks like a dupe of #194475. |
13 tasks
Contributor
Author
|
It doesn't look like #194475 is moving forward (it hasn't been reviewed in over a year). Can we get this merged as a stopgap measure and plan to replace it with a better solution when one becomes available? The perfect is the enemy of the good, and this PR is small and addresses a very inconvenient missing feature in |
r-vdp
approved these changes
Jun 20, 2024
Contributor
r-vdp
left a comment
There was a problem hiding this comment.
Tried it out and it worked well! This makes it so much easier to override rust packages.
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
Mic92
reviewed
Jun 27, 2024
| # Derivations built with `buildRustPackage` can already be overridden with | ||
| # `override`, `overrideAttrs`, and `overrideDerivation`. | ||
| # This function introduces `overrideRust` and it overrides the call to | ||
| # `buildRustPackage`. |
Member
There was a problem hiding this comment.
Some motivation would be nice.
Suggested change
| # `buildRustPackage`. | |
| # `buildRustPackage`. This is useful for ... |
13 tasks
Contributor
Author
|
Looks like the winds are swaying towards #194475. |
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.
This lets you write code like this:
Previously, it was essentially impossible to override
cargoHash.