On Sat, Jan 14, 2023 at 3:43 AM Jerry Kefas via lists.yoctoproject.org
<[email protected]> wrote:
>
> When creating recipes for Rust projects, all of the required crates are
> included in SRC_URI. I need to patch the source of several crates. I've tried
> creating individual recipes, but that does not really help.
>
If you're just patching in later versions of the crates, this should work:
SRC_URI += "crate://crates.io/<target>/<version>"
EXTRA_OECARGO_PATHS = "${CARGO_VENDORING_DIRECTORY}/<target>-<version>"
or if you have them patched in a git repo:
SRC_URI += "git://.../<target>"
EXTRA_OECARGO_PATHS = "${WORKDIR}/<target>"
Only works if they're already in crates.io though
(https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html)
and you'll probably run into
https://github.com/rust-lang/rust/issues/98185
> I've managed to get a hacky fix to work, however it involves having recipes
> copy source from the tmp/work directory, which is not ideal. It patches the
> Cargo.toml to replace the version of the dependency with a local path to
> expect the sources in.
>
I suspect we really need some standard machinery here.
--
Alex Kiernan
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#58989): https://lists.yoctoproject.org/g/yocto/message/58989
Mute This Topic: https://lists.yoctoproject.org/mt/96261817/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-