Nix Rust | 697 Members | |
| Rust | 157 Servers |
| Sender | Message | Time |
|---|---|---|
| 15 Jan 2026 | ||
| * Hello! I'm trying to package a rust program, however one of the dependent crates is failing to build due to a missing patch. This is my package.nix: https://bpa.st/LQWQ I'm getting the error: Error: "Error applying patch '/build/tari-5.2.0-vendor/libtor-src-47.13.0+0.4.7.13/patches/libevent-0001-libevent-makefile.patch': \"Os { code: 2, kind: NotFound, message: \\\"No such file or directory\\\" }\""I am able to find the patch file in nix store: /nix/store/109zbiqkhxnw9dpr0qazg29m4ap8p6ha-tari-5.2.0-vendor/libtor-src-47.13.0+0.4.7.13/patches, but I'm not quite sure how to tell cargo to look there. Would appreciate any help :) | 01:14:16 | |
| Redacted or Malformed Event | 01:37:24 | |
I thought maybe the directory under /nix/store differed from the actual build directory, but after running nom build .#tari --keep-failed and checking the build directory under /nix/var/nix/builds/..., the patches directory is there too. I'm really confused now where the no such file error is coming from :/ | 03:03:24 | |
| figured it out! | 06:42:43 | |
| Have not been able to get this to work using
but unfortunately get
which seems odd, as it's clearly properly locked:
Unfortunately
| 15:44:32 | |
| 21:45:52 | ||
| Hey folks! I'm trying to get miri to work on Nix Darwin. I am using rust-overlay for my devShell:
When I execute miri, it seems to believe it can't find cargo-miri:
I do still see
Anyone got any insight? | 23:55:11 | |
| 16 Jan 2026 | ||
| 00:49:58 | ||
fwiw I did pkgs.rust-bin.fromRustupToolchain { channel = "nightly"; components = ["miri" "rust-src"]; } last time I needed Miri. maybe toolchain.default.override doesn't work properly there. not sure | 02:47:25 | |
| Still doesn't work, hm | 03:13:56 | |
| I've got my miri package definitions here if it helps: [https://github.com/accelbread/flakelight-rust/tree/master/packages](miri packages) | 05:43:42 | |
| * I've got my miri package definitions here if it helps: https://github.com/accelbread/flakelight-rust/tree/master/packages | 05:43:54 | |
| Has anyone gotten build-std working with nixpkgs rustc? | 05:57:29 | |
| thank ya, I'll try this out | 15:47:28 | |
| 17 Jan 2026 | ||
| 03:33:14 | ||
| 03:35:00 | ||
| 03:37:35 | ||
| are there any tricks for speeding up local build times for rust packages in nixpkgs?
20 minutes is wild | 06:04:49 | |
try disabling runtime performance optimizations like codegen-units = 1 and lto = true https://github.com/stalwartlabs/stalwart/blob/22fc4a795d56264aefd082040c6998c9371b83aa/Cargo.toml#L46-L47 | 06:21:37 | |
| not sure if that fits your "local" criteria though | 06:22:30 | |
| oh, i was hoping to do it from the building side without modifying the project | 06:22:44 | |
| i don't know any such tricks unfortunately (but maybe someone else might?) | 06:23:11 | |
i mean, you could add patches to the derivation to make those changes via overrideAttrs, unless you really mean "without changing any nix code or upstream code" | 06:25:20 | |
| ah, i'll give that a shot. what do we lose with LTO, though? | 06:26:09 | |
| https://doc.rust-lang.org/cargo/reference/profiles.html#lto | 06:26:46 | |
| summary to the point of being unhelpful: you lose some performance | 06:27:20 | |
| Should be about the same performance as a non-incremental release build, if it's way slower than that you may be building at cores = 1 or something along those lines | 06:28:07 | |
| makes sense, so then whatever I write in overrideAttrs shouldn't be pushed to nixpkgs :) | 06:28:13 | |
| yeah | 06:28:31 | |
| for in-nixpkgs stuff the runtime performance increase is possibly worth the build time increase since it can then be pulled by multiple users from the binary cache without having to build it themselves | 06:30:40 | |