20 Aug 2024 |
Ralith | you can't mix and match different rustc versions, anyway | 00:49:45 |
| benwebb changed their display name from benjaminedwardwebb to benwebb. | 12:44:09 |
blitz | Hey! Is there a good way to patch rust dependencies? Specifically I have a patch file for one dependency that I would like to apply. But cargo [patch] can't do this and I also don't see anything for buildRustPackage. Does anyone have a pointer? | 14:46:19 |
emily | I think you can patch it in the vendor/ directory | 14:49:44 |
emily | but it's ugly | 14:49:46 |
blitz | is cargoPatches the right way to go? | 14:50:42 |
blitz | or do I have to manually patch it in one of the phases? | 14:50:51 |
emily | should just be patches | 14:53:50 |
emily | unless you are touching Cargo.lock stuff | 14:53:58 |
blitz | https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/rust.section.md#vendoring-of-dependencies-vendoring-of-dependencies <- this looks like it could work. let me try... | 14:55:51 |
blitz | emily
| 15:13:52 |
blitz | * emily
| 15:13:59 |
blitz | * emily
postPatch = ''
patch -d ../cargo-vendor-dir/somecrate-0.10.0 -p2 -i ${./some.patch}
'';
| 15:14:22 |
blitz | this works | 15:14:28 |
emily | you can probably just use patchFlags also | 15:15:14 |
emily | but yeah, sure :) | 15:15:22 |
emily | (why do you need to do this anyway?) | 15:15:27 |
blitz | https://github.com/cloud-hypervisor/cloud-hypervisor/issues/6673 | 15:16:14 |
blitz | before the fix is merged, it's easier to just patch the couple of lines that cause the issue in the dependent crate rather than the crate updates | 15:16:52 |
emily | ah | 15:19:03 |
21 Aug 2024 |
| Fraol Lemecha set a profile picture. | 20:24:14 |
22 Aug 2024 |
| Jared Baur set a profile picture. | 02:07:14 |
| Jack Leightcap joined the room. | 02:52:22 |
Jack Leightcap | hey all -- i'm packaging a rust project, and noticed that nixpkgs doesn't include oxalica/rust-overlay: i'm curious then if there's a way to add targets to rustc inside nixpkgs, something like in a rust-toolchain.toml targets = [ "thumbv7em-none-eabihf" ] | 03:01:12 |
Jack Leightcap | the context is an embedded firmware, so the target platform is fixed to arm-embedded. would pkgsCross.arm-embedded accomplish this? | 03:05:10 |
ghpzin | Pretty sure this exact target is covered by something related to cross in rust section in nixpkgs. | 04:26:18 |
ghpzin | * Jack Leightcap: Pretty sure this exact target is covered by something related to cross in rust section in nixpkgs. https://github.com/NixOS/nixpkgs/blob/c79da508a6bea132f3a0debcec870063f99078f1/doc/languages-frameworks/rust.section.md#cross-compilation-cross-compilation | 04:27:01 |
Jack Leightcap | thanks, RTFM needed and useful here | 04:38:57 |
ghpzin | Does anybody know if there are workarounds for Cargo.lock having dependencies with same name, but different urls ? https://github.com/NixOS/nixpkgs/issues/183344 | 06:21:05 |
ghpzin | * Does anybody know if there are workarounds for Cargo.lock having dependencies with same name, but different urls ? https://github.com/NixOS/nixpkgs/issues/183344 (other than editing Cargo.lock to use same one and hoping for the best) | 06:24:01 |