Nix Rust | 696 Members | |
| Rust | 157 Servers |
| Sender | Message | Time |
|---|---|---|
| 13 Feb 2025 | ||
| But I might have been looking in the wrong corner of rustc | 14:36:59 | |
| IIRC the problem was that it didn't accomodate the possibility that you'd be building std and no_std targets at the same time. | 14:37:22 | |
Alyssa Ross: does this look like anything familiar? https://hydra.nixos.org/build/288008080/nixlog/1 looks like it broke when the useFetchCargoVendor cycle landed | 14:38:20 | |
| (going to investigate myself at some point since I theoretically maintain it, but maybe it's something obvious/known) | 14:38:39 | |
| cc Toma | 14:38:51 | |
In reply to @qyliss:fairydust.spaceI'll have another look if I can nail it down | 14:40:33 | |
In reply to @emilazy:matrix.org finalAttrs.cargoDeps.patches is no longer valid (maybe null, idk can't check rn), since patches gets passed into cargoDeps.vendorStaging there should probably be a way to pass attrs to the non-staging drv. Though, in this case we actually need to pass to the staging FOD. | 15:31:23 | |
| --- Btw are we still considering renaming fetchCargoVendor? If yes, we probably need a better name than .vendorStaging. Ideas: .staging, .stage, .fod anyone have better names? | 15:35:55 | |
did I already suggest .sources? | 15:48:19 | |
or even .src, since it's somewhat analogous to a normal derivation's src | 15:49:02 | |
| 19:00:38 | ||
| 14 Feb 2025 | ||
| hm, tried compiling on rustc master outside nix and that worked out fine with aarch64-darwin + bpfel-unknown-none in the same config | 22:12:46 | |
| will try again with 1.84.0 | 22:13:01 | |
never mind that, forgot that ./x.py build and ./x.py doc are separate commands | 22:28:30 | |
Alyssa Ross: I think I found the bug in bootstrap and have a fix... while it does have explicit no_std handling, that behavior seems to not have been tested for for doc but only for build: it returns an empty vec of crates to document, which the documentation stage then interprets as "all libraries" instead of "no libraries" | 23:01:32 | |
| so the fix is to skip the documentation stage for any targets that return the empty vec | 23:01:50 | |
| I'm sure upstream has a more thorough explanation for this and can probably come up with an even better solution once I propose it there, but it should be enough to unblock adding bpfe targets without causing any issues to the other targets | 23:02:30 | |
| so the fix is literally just:
| 23:12:20 | |
| I'll open a staging PR with that + adding the bpfe targets in sec | 23:15:42 | |
| 15 Feb 2025 | ||
| If I were to try and solve the issue of cross compiling for windows and pthreads (see https://github.com/NixOS/nixpkgs/issues/139966), what would be the best way to go about it? I would prefer to fix it so that it works with cargoBuildHook since I use that at work. Pretty much every Rust project I work on runs into this as all are crossed to Windows. My best thought so far is to add a default | 03:16:34 | |
| 10:15:20 | ||
| 10:43:24 | ||
If you need to build a binary for the build platform, you need GCC, Rust, and Cargo in depsBuildBuild. | 12:45:53 | |
| 16 Feb 2025 | ||
| 01:03:24 | ||
| 17 Feb 2025 | ||
| https://github.com/NixOS/nixpkgs/pull/382251#pullrequestreview-2619407128 | 04:28:59 | |
| It seems that nix darwin fetch-cargo-vendor is broken | 04:30:24 | |
| 07:46:17 | ||
| o/ hoping for a bit of advice, I'm currently trying to set up a CI flow with crate2nix to test some code. The tests involve spinning up a test environment with I'm using Does this seem like a reasonable approach? Could it be something crate2nix is interested in as a supported use case? Any other ideas on how to handle tests like this? | 07:52:47 | |
| If you’re doing encapsulated end-to-end tests, I can highly recommend nixos vm-based tests. There’s some really good write-ups out there, including my own mediocre one, https://boinkor.net/2024/02/saved-by-nixos-integration-tests-surprisingly/ | 12:45:15 | |
| This means extracting your e2e testing from rust tests, but you gain stuff like more realistic networking between your components | 12:48:35 | |