buildRustPackage: add overrideRust attribute#288430
buildRustPackage: add overrideRust attribute#2884309999years wants to merge 1 commit intoNixOS:masterfrom
Conversation
|
Functionality-wise, this looks like a dupe of #194475. |
|
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
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: https://discourse.nixos.org/t/how-do-you-override-the-commit-rev-used-by-a-rust-package/47698/5 |
| # Derivations built with `buildRustPackage` can already be overridden with | ||
| # `override`, `overrideAttrs`, and `overrideDerivation`. | ||
| # This function introduces `overrideRust` and it overrides the call to | ||
| # `buildRustPackage`. |
There was a problem hiding this comment.
Some motivation would be nice.
| # `buildRustPackage`. | |
| # `buildRustPackage`. This is useful for ... |
|
Looks like the winds are swaying towards #194475. |
This lets you write code like this:
Previously, it was essentially impossible to override
cargoHash.