Skip to content
Unverified Commit e1aecec4 authored by Yurii Rashkovskii's avatar Yurii Rashkovskii
Browse files

build-support/rust: make use of abandoned cargoUpdateHook

Previously, cargoUpdateHook was meaningful as it was used
in
[`cargo-fetch-deps`](https://github.com/NixOS/nixpkgs/blob/19d3cf81d3436a6600f261579b55b9132a6ca8fb/pkgs/build-support/rust/fetch-cargo-deps#L71).

However, this entire file was removed in
5f8cf004. As far as I can
tell, nothing in the code is using it, but it is still
being passed around:
https://github.com/NixOS/nixpkgs/search?q=cargoUpdateHook&type=Code&utf8=%E2%9C%93

There are, however, legitimate use cases for it. For example,
in some software, some dependencies are not locked in Cargo.toml
and this causes Cargo to try fetching another version of them.
This doesn't work well with vendoring crates.

This hook allows to inject patching or whatever necessary workarounds
in the crate vendoring process. I suppose that's what it was for
in there in the first place.

This patch restores this hook and makes it usable again.
parent 472dd33e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment