!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

662 Members
Rust147 Servers

Load older messages


SenderMessageTime
11 Jan 2026
@ghpzin:envs.net@ghpzin:envs.net left the room.16:21:21
12 Jan 2026
@grand_master_programmer:matrix.orgjimmie joined the room.08:06:07
@grand_master_programmer:matrix.orgjimmie changed their display name from zigzen to jimmie.08:12:31
@isabel:isabelroses.comisabel changed their profile picture.18:59:37
@n8henrie:matrix.orgn8henrie

Hi all -- anybody doing much bare-metal embedded work with nix + rust?

I'm a novice and just learning for fun, but can't seem to get a build to succeed due to multiple conflicting dependencies for build-std for an attiny85. Builds and runs on my aarch64-darwin machine outside of nix, just trying to see if I can get it to work in nix as well (via oxalica/rust-overlay).

For my prior ESP32C3 projects, I know that build-std often requires adding some additional dependencies that are not needed when building outside of nix tooling; I've previously added these to the dev requirements.

Unfortunately in this case, I'm finding that both wasi = "0.14.4" and wasi = "0.11.0" are required, and obviously I can't list both.

Does anyone know of a workaround for this? It looks like naersk may have support for an "additional" Cargo.lock, but I'd rather not learn a new pattern if there is a way to accomplish this with standard nix tooling (and oxalica for nightly).

Thanks for any suggestions!

My WIP: https://github.com/n8henrie/attiny85-relay/tree/nix

22:46:08
@emilazy:matrix.orgemily you can probably lockFileContents = builtins.readFile ./Cargo.lock + '' … ''; 23:08:02
@emilazy:matrix.orgemily you could also consider just setting a cargoHash rather than importing the lock file directly 23:08:14
@emilazy:matrix.orgemily(but ofc will have to update it on every lock file change)23:08:19
@emilazy:matrix.orgemily cc Toma who might have other ideas 23:08:28
@emilazy:matrix.orgemily(fwiw, I wouldn't use naersk these days, crane might be worth a look though)23:10:21
13 Jan 2026
@n8henrie:matrix.orgn8henrie

Setting lockFileContents results in a complaint about cargoHash:

> ERROR: cargoHash or cargoSha256 is out of date
>
> Cargo.lock is not the same in /nix/var/nix/builds/nix-24411-1007667852/cargo-vendor-dir

Setting cargoHash = "" doesn't change the error?

Will tinker more, and will look into crane -- thanks!

00:29:59
@emilazy:matrix.orgemily I mean you can skip all the cargoLock, Git hashes, etc. stuff and just specify cargoHash = ""; and then fill in the hash it gives (I think?) 00:30:28
@emilazy:matrix.orgemily unless build-std messes with that, which is… possible 00:30:33
@n8henrie:matrix.orgn8henrieWas hoping to avoid the "update every time the lock file changes" issue you mentioned. Figure the nightly version is locked so the deps required for build-std should be static (?). Maybe I misunderstood your comment though.00:41:17
@eveeifyeve:matrix.orgeveeifyeveDid anyone look into this.10:42:27
@eveeifyeve:matrix.orgeveeifyeve* Did anyone look into this?10:50:50
14 Jan 2026
@jaen:matrix.orgjaen changed their profile picture.11:59:58
@yawd:matrix.orgDiego Reishey guys, I'm having a hard time to build a rust project with tikv-jemalloc-sys, does anybody else faced it before?18:10:31
@k900:0upti.meK900Don't we literally have a hook for that18:14:06
@yawd:matrix.orgDiego Reiscan you link it? I'm quite new into nix/nixos 18:19:10
@yawd:matrix.orgDiego Reistbh not even know what a hook is on nix18:19:34
@phanirithvij:matrix.orgloudgolemrust-jemalloc-sys and rust-jemalloc-sys-unprefixed. Look for usages of these in nixpkgs18:34:10
@yawd:matrix.orgDiego Reisamazing! Thank you18:44:52
@yawd:matrix.orgDiego Reisgotta study more18:45:04
@ttraj:matrix.orgttraj joined the room.22:47:23
15 Jan 2026
@bivsk:matrix.orgbivsk joined the room.00:37:38
@bivsk:matrix.orgbivsk

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 :)

00:48:27
@bivsk:matrix.orgbivsk * 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
@bivsk:matrix.orgbivskRedacted or Malformed Event01:37:24
@bivsk:matrix.orgbivsk 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

Show newer messages


Back to Room ListRoom Version: 6