!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

687 Members
Rust155 Servers

Load older messages


SenderMessageTime
18 Mar 2025
@fliegendewurst:matrix.orgFliegendeWurstI'll check. This package used to build before the staging-next in February. The odd thing is that it still builds fine for other Hydra architectures ...10:15:16
@fliegendewurst:matrix.orgFliegendeWurst

Oh, there is a config.toml with:

[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"

That certainly explains it

10:16:00
@sigmasquadron:matrix.orgSigmaSquadron * Hi folks. I'm getting a really weird issue with fetchCargoVendor. I'm updating below to 0.9.0, and their Cargo.toml requires anyhow 1.0.95, but Nix is vendoring 1.0.80 for some reason. Nevermind. Upstream did an oops. 10:21:01
@tomasajt:matrix.orgTomaThey must have not committed the lockfile10:21:07
@tomasajt:matrix.orgTomaI se, just edited10:21:20
@tomasajt:matrix.orgToma* I see, just edited10:21:28
@sigmasquadron:matrix.orgSigmaSquadron
In reply to @tomasajt:matrix.org
They must have not committed the lockfile
Yep, that's exactly it. Guess we just update the lockfile ourselves and commit to Nixpkgs?
10:21:36
@tomasajt:matrix.orgToma Creating a .patch is less lines overall 10:22:02
@tomasajt:matrix.orgTomaAlso, maybe open an issue upstream if you have the time10:22:40
@sigmasquadron:matrix.orgSigmaSquadron
In reply to @tomasajt:matrix.org
Also, maybe open an issue upstream if you have the time
Already one up.
10:22:49
@tomasajt:matrix.orgToma * Creating a .patch is less lines overall (remember to use cargoPatches instead of patches) 10:23:48
@sigmasquadron:matrix.orgSigmaSquadron
In reply to @tomasajt:matrix.org
Creating a .patch is less lines overall (remember to use cargoPatches instead of patches)
Uh, the patch ended up being around 400 lines longer
10:28:32
@tomasajt:matrix.orgToma I still recommend using a .patch because you'd have to use depsExtraArgs if you wanted to use postPatch 10:42:08
@sigmasquadron:matrix.orgSigmaSquadronYeah i'm going with the patch.10:42:24
@sigmasquadron:matrix.orgSigmaSquadronwhy is it so hard for upstreams to commit their lockfiles is beyond me10:42:49
@tomasajt:matrix.orgTomaI'm guessing in this case it's because the ./below/Cargo.toml file was not next to the ./Cargo.lock file, and they only commited changes to the ./below directory11:02:18
19 Mar 2025
@niko:nrab.lolniko ⚡️

There may be an issue with rust bindgen packaging (or an issue with rust bindgen itself)
Context: I’m building asahi mesa fork for x86 on aarch64 for fex.

At first I thought meson is hanging but after some investigation I figured out bindgen is hanging because it’s trying to run llvm-config. Which because it’s a cross compile, is an x86_64-linux binary. Instead of running llvm-config-native. Once I set LLVM_CONFIG_PATH variable the build succeeded. I don’t think that should be happening? Part of it is probably that I have misconfigured binfmt and running x86 binaries hangs, but bindgen should by default run llvm-config-native when cross compiling, right? Instead of trying to run llvm-config, which in this case is compiled for the wrong architecture

10:56:11
22 Mar 2025
@gumby0811:matrix.orggumby0811what is the most popular Rust library for working with Nix? I am teaching myself Rust and I want to build a thing that can read from an OCI registry and write to the Nix Store.. with an eventual goal of maybe allowing the OCI registry to be used for substitution... but these are all kind of lofty goals.. I am very much a Rust novice.... this seems simple to do but I don't know what I don't know. I've already got a thing hobled together allowing me to write arbitrary files to an OCI registry.. 15:33:04
@k900:0upti.meK900You'll really want to go through libstore for this15:33:56
@k900:0upti.meK900Via rust-cxx or sometihg15:34:17
@k900:0upti.meK900* Via rust-cxx or something15:34:19
@k900:0upti.meK900 Or just call nix-store --add-fixed or whatever 15:34:29
@gumby0811:matrix.orggumby0811ok i'll check that out thanks... ahh thats a good idea.. 15:34:43
@k900:0upti.meK900But really the big problem would be actually making the planner aware of other types of substituters15:34:55
@k900:0upti.meK900You'd have to write your own store subclass and that's C++15:35:04
@k900:0upti.meK900Even Lix doesn't have enough Rust infrastructure to do that in Rust15:35:19
@gumby0811:matrix.orggumby0811sounds like a learning opportunity 15:35:27
@k900:0upti.meK900But also I'd argue there's a pretty big impedance mismatch between OCI semantics and Nix stores15:35:59
@gumby0811:matrix.orggumby0811my short term goal would simply be hey can I take a registry layer and store it in Nix and it be equivalent to something built purely with Nix. 15:36:09
@k900:0upti.meK900Nix doesn't really need anything the OCI spec provides15:36:12

Show newer messages


Back to Room ListRoom Version: 6