-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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: add overrideRust attribute #288430
base: master
Are you sure you want to change the base?
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 |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some motivation would be nice.
# `buildRustPackage`. | |
# `buildRustPackage`. This is useful for ... |
This lets you write code like this:
Previously, it was essentially impossible to override
cargoHash
.