!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

683 Members
Rust155 Servers

Load older messages


SenderMessageTime
4 Mar 2022
@slby:matrix.orgslby

This is the problem that crate2nix gives me:

Caused by:
  feature `edition2021` is required

  consider adding `cargo-features = ["edition2021"]` to the manifest
crate2nix failed.

Does anyone know where I should specify the manifest? I am using generatedCargoNix

10:13:11
@vika:fireburn.ruVika (she/her) joined the room.20:15:49
@slby:matrix.orgslby
In reply to @slby:matrix.org

This is the problem that crate2nix gives me:

Caused by:
  feature `edition2021` is required

  consider adding `cargo-features = ["edition2021"]` to the manifest
crate2nix failed.

Does anyone know where I should specify the manifest? I am using generatedCargoNix

I needed to use the unstable channel, then it worked.
20:17:38
5 Mar 2022
@atharvaamritkar:matrix.orgwiredhikari joined the room.21:17:56
6 Mar 2022
@niklauzg:matrix.orgNiklauz joined the room.14:56:30
7 Mar 2022
@nickhu:matrix.orgNick Hu joined the room.18:33:25
@nickhu:matrix.orgNick HuCross posting from the main nixos channel: Hi, I'm trying to use naersk to build a rust project, but it seems like both the main-deps derivation and the main derivation are compiling all the dependencies of the project, would anyone be able to help me debug this?18:34:02
@nickhu:matrix.orgNick Hu *

Cross posting from the main nixos channel:

Hi, I'm trying to use naersk to build a rust project, but it seems like both the main-deps derivation and the main derivation are compiling all the dependencies of the project, would anyone be able to help me debug this?

18:52:27
@nickhu:matrix.orgNick Hu Before main begins its build phase, naersk has successfully untarred a bunch of stuff into ./target/release/..., and I also confirmed manually that the output tarball of the main-deps derivation is not empty (it's > 100MB) 18:53:30
@nickhu:matrix.orgNick HuBut for some reason whenever it starts building it wants to recompile everything18:53:47
9 Mar 2022
@atharvaamritkar:matrix.orgwiredhikariHello I am a bit new to nix packaging for rust apps, could anyone share some resources apart from https://nixos.org/manual/nixpkgs/stable/#rust06:22:25
@slby:matrix.orgslby
In reply to @atharvaamritkar:matrix.org
Hello I am a bit new to nix packaging for rust apps, could anyone share some resources apart from https://nixos.org/manual/nixpkgs/stable/#rust
https://github.com/kolloch/crate2nix https://github.com/yusdacra/nix-cargo-integration/ https://github.com/nix-community/naersk https://github.com/nix-community/fenix https://github.com/oxalica/rust-overlay https://www.tomhoule.com/2021/building-rust-wasm-with-nix-flakes/ https://hoverbear.org/blog/rust-bindgen-in-nix/ https://nixos.wiki/wiki/Rust
09:00:49
@tomberek:matrix.orgtomberek@slby: while still experimental and a bit in flux, https://github.com/nix-community/dream2nix#test-the-experimental-version-of-dream2nix has been an quick/easy way to get rust apps packaged when needed, not ideal for Nixpkgs yet.13:14:53
@nickhu:matrix.orgNick Hu+1 for yusdacra/nix-cargo-integration, it's really a nice framework. Although I would suggest using the version with crate2nix support, as dream2nix is not stable enough in my experience16:03:13
10 Mar 2022
@slby:matrix.orgslby
In reply to @tomberek:matrix.org
@slby: while still experimental and a bit in flux, https://github.com/nix-community/dream2nix#test-the-experimental-version-of-dream2nix has been an quick/easy way to get rust apps packaged when needed, not ideal for Nixpkgs yet.
Do you know how to get the .justBuild of dream2nix working in the presentation? I like the possibility of makeFlakeOutputs, but when integrating into an already existing system, I find it a little werid.
06:31:51
@slby:matrix.orgslby But yes, dream2nix is pretty amazing. 06:32:07
@tomberek:matrix.orgtomberekFor more complex usage or integration with a larger system it might be easier for the moment to try buildRustPackage07:18:01
@slby:matrix.orgslbyYes, but then caching doesn't work as well anymore, at leas that's what I have found. They have all their place atm. 14:39:39
13 Mar 2022
@atharvaamritkar:matrix.orgwiredhikari set a profile picture.09:24:52
@arashsm79:kde.orgarashsm79 joined the room.10:26:34
16 Mar 2022
@ultranix:matrix.orgtgunnoe set a profile picture.03:48:26
@0x4a6f:matrix.org[0x4A6F] RPATH, or why lld doesn’t work on NixOS 17:11:48
@jonringer:matrix.orgjonringer
In reply to @0x4a6f:matrix.org
RPATH, or why lld doesn’t work on NixOS
https://discourse.nixos.org/t/how-rpath-works-or-doesnt-on-nixos/18182
17:14:47
@hexa:lossy.networkhexalld is actually llvmPackages.lld17:18:48
@hexa:lossy.networkhexaso llvmPackages.binutils gets you a wrapped version of lld, but llvmPackages.lld doesn't 17:19:08
@hexa:lossy.networkhexaI hope there is a good reason for that behaviour 🙂17:19:17
@slby:matrix.orgslbyIs there a good way to expose features in flakes? 20:13:47
@slby:matrix.orgslby So when I do a nix run / nix build I can pass a flag? Or do I need to create a different package just for that. 20:14:25
@cole-h:matrix.orgcole-h Flakes are pure, so you can't use --arg asdf with them
You'd have to have a different package per configuration
20:25:51
@slby:matrix.orgslbyThanks, that confirming my assumption, wow that can get a lot of packages quickly. 20:38:08

Show newer messages


Back to Room ListRoom Version: 6