Nix Rust | 651 Members | |
| Rust | 147 Servers |
| Sender | Message | Time |
|---|---|---|
| 4 Aug 2025 | ||
I'm not sure. It's even worse than this in reality. This is an unholy abomination. We're a few years out of date with nixpkgs and the latest nix-ros-overlay so I'm trying to jam these packages into our older nix-ros-overlay with an overlay and then use rust from nix-unstable to compile the zenoh packages since they require a newer toolchain. Miraculously it works natively but dies horribly during cross | 18:48:11 | |
| uhhh | 18:49:01 | |
| yep | 18:49:09 | |
| you should be happy it can build anything :D | 18:50:05 | |
| honestly it's pretty impressive that nix can do this when non-cross | 18:50:30 | |
anyway any time you nativeBuildInputs you must explicitly use buildPacakges | 18:50:45 | |
| since no splicing | 18:50:51 | |
Okay! So I got it to use the right packages by using buildPackages.{rustPlatform, cargo, rustc}. It turns out I had to tell zeno to pass the right architecture down to cmake with cmakeFlags = [ "-DZENOHC_CUSTOM_TARGET=aarch64-unknown-linux-gnu" ]; | 20:06:51 | |
| 20:33:12 | ||
| 21:18:59 | ||
| 21:52:01 | ||
| 5 Aug 2025 | ||
| 09:49:06 | ||
| 20:14:27 | ||
| 6 Aug 2025 | ||
| 18:30:52 | ||
| 7 Aug 2025 | ||
| 17:31:33 | ||
| How do I find out what "buildRustPackage" has as far as options? Like, I see it has a 'buildFeatures' option by looking at someone else's code, but does it have a buildPackages option, for instance? Where would I look to find that out? Basically I want to specify which particular binary in the cargo.toml to build. Normally would do this with | 23:10:42 | |
| * How do I find out what "buildRustPackage" has as far as options? Like, I see it has a 'buildFeatures' option by looking at someone else's code, but does it have a cargoPackages option, for instance? Where would I look to find that out? Basically I want to specify which particular binary in the cargo.toml to build. Normally would do this with | 23:12:04 | |
In reply to @damccull:matrix.orgmaybe buildAndTestSubdir? it's a bit confusingly documented i agree | 23:18:36 | |
| So this is what I'm using in my flake:
I want to run | 23:23:23 | |
| 8 Aug 2025 | ||
| Think I've got it. | 00:05:10 | |
| 12:07:13 | ||
| 02:34:43 | ||
| Hi,
Any idea? | 14:34:53 | |
| I have a cmake project that is also a cargo workspace. So there is a top-level Cargo.lock and multiple Cargo.toml files. How do I build? I'm using:
but at some point nix still tries to download from crates.io and obviously fails | 18:56:53 | |
| Depends on what your CMake build system is doing | 18:57:23 | |
| It's nothing exciting: https://github.com/eclipse-zenoh/zenoh-plugin-ros2dds/blob/main/CMakeLists.txt | 18:57:47 | |
maybe i need to patch the cargo invocation | 19:14:19 | |
I figured it out. I had to add rustPlatform.cargoSetupHook | 19:26:55 | |
| 9 Aug 2025 | ||
| 15:15:41 | ||
| 15:54:54 | ||