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: allow patches to fix Cargo.lock #44981
Conversation
Did you verify with |
Maybe document cargoPatches in doc/languages-frameworks/rust.section.md ? |
@LnL7 I don't know how to verify with @symphorien Good point, done! |
@@ -59,6 +59,10 @@ all crate sources of this package. Currently it is obtained by inserting a | |||
fake checksum into the expression and building the package once. The correct | |||
checksum can be then take from the failed build. | |||
|
|||
When there is an error in the `Cargo.lock` provided by upstream, it is possible |
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.
When the `Cargo.lock` file, provided by upstream, is not in sync with the `Cargo.toml` it is possible to use `cargoPatches` to update it.
@@ -59,6 +59,10 @@ all crate sources of this package. Currently it is obtained by inserting a | |||
fake checksum into the expression and building the package once. The correct | |||
checksum can be then take from the failed build. | |||
|
|||
When there is an error in the `Cargo.lock` provided by upstream, it is possible | |||
to use `cargoPatches` to fix this up. All patches added in `cargoPatches` will | |||
also be prepended to the patches in `patches` for build-time. |
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.
at build-time
Thanks! fixed :) |
Motivation for this change
Version that should work of #44967
I have checked building a package that requires it (#44968) and a project that uses dynamic patches (
rustracer
).rustracer
's hashes appear to not have changed, so I guess it's alright :)cc @Mic92 @LnL7
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)