!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

639 Members
Rust146 Servers

Load older messages


SenderMessageTime
27 Sep 2025
@dramforever:matrix.orgdramforever
In reply to @utdemir:matrix.org

Hey - I'm building a Rust application (on a Mac with { system = x86_64-linux } using a linux builder) using crate2nix and on the final executable I'm seeing a dependency to rust-minimal-1.85.0 - which then pulls in a lot of development tooling. Is there any flag etc. I can set to reduce the dependencies?

Sorry I don't have an example I can show - but practically it's not much different than the hello-world example on their repo.

you can try to figure out why with nix why-depends --precise your-store-path unwanted-dependency
21:37:30
@utdemir:matrix.orgutdemir
/kwnixzwqizv8701i7rj8lfqs6s0wm6hc-crate-monotone-api-0.1.0-bin
└───bin/monotone-api: …3.1/src/header/map.rs/nix/store/5h1cbigspbf8i1wa7f4h63v6jdmynwas-rust-minimal-1.85.0/lib/rustlib…
    → /5h1cbigspbf8i1wa7f4h63v6jdmynwas-rust-minimal-1.85.0

Looks like debugging symbols to me (src/header/map.rs etc.)

21:39:27
@utdemir:matrix.orgutdemir *

Hey - I'm building a Rust application (on a Mac with { system = x86_64-linux } using a linux builder) using cargo2nix and on the final executable I'm seeing a dependency to rust-minimal-1.85.0 - which then pulls in a lot of development tooling. Is there any flag etc. I can set to reduce the dependencies?

Sorry I don't have an example I can show - but practically it's not much different than the hello-world example on their repo.

21:42:29
@utdemir:matrix.orgutdemir Hmm - apparently a stdenv.isDarwin check that disables debugging symbols ends up being true even though I thought I passed a nixpkgs with a linux system. That might be it - trying to figure out how to override it now. 21:44:26
@rosssmyth:matrix.orgrosssmyth You can also try using removeReferencesTo 21:57:18
28 Sep 2025
@dramforever:matrix.orgdramforeverrequest for taking-a-look-if-you're-feeling-like-it (RFTALIYFLI) https://github.com/NixOS/nixpkgs/pull/446668 17:06:12
@dramforever:matrix.orgdramforeverScreenshot_20250929_010639.png
Download Screenshot_20250929_010639.png
17:06:54
29 Sep 2025
@ptramo:matrix.orgPierre Carrier joined the room.20:01:56
@ptramo:matrix.orgPierre Carrierhi! trying to build a project with crate2nix and I need to set an env var for one of the packages in the workspace. is that possible?20:02:36
@k900:0upti.meK900 I don't think crate2nix is really actively maintained 20:16:36
@ptramo:matrix.orgPierre Carrier@k900 any good alternatives?20:23:51
@charles:computer.surgeryCharlescrane is alright20:24:00
@charles:computer.surgeryCharlesnot the same operating principle though20:24:07
@ptramo:matrix.orgPierre CarrierRebuilds all deps whenever a single dep changes.20:24:14
@k900:0upti.meK900 Is that really such a problem? 20:24:35
@ptramo:matrix.orgPierre Carrieryeah we actively moved away from it for that reason20:24:49
@charles:computer.surgeryCharlesthere's cargo2nix which builds derivations per crate but also looks undermaintained (last commit 3 months ago)20:25:13
@charles:computer.surgeryCharles* there's cargo2nix which builds derivations per crate too (iirc) but also looks undermaintained (last commit 3 months ago)20:26:22
@rosssmyth:matrix.orgrosssmythShould go ask in the Snix channel as they are really the main users of it. 20:26:25
@ptramo:matrix.orgPierre Carrierthanks20:26:33
@ptramo:matrix.orgPierre Carrierhow do I set an env var with crane? :)20:42:47
@ptramo:matrix.orgPierre CarrieroverrideAttrs, apparently :)20:46:33
@charles:computer.surgeryCharlescan't you just do it like you can with mkDerivation?21:39:15
30 Sep 2025
@17lifers:mikuplushfarm.ovh17lifers (at mikuplushfarm) joined the room.16:05:12
@17lifers:mikuplushfarm.ovh17lifers (at mikuplushfarm) 16:07:14
@mjolnir:nixos.orgNixOS Moderation Bot banned @mightyiam:matrix.org@mightyiam:matrix.org (divisive behavior.).19:22:29
@saiko:knifepoint.net@saiko:knifepoint.net left the room.19:30:42
1 Oct 2025
@realsnick:matrix.org@realsnick:matrix.org joined the room.07:11:05
@realsnick:matrix.org@realsnick:matrix.org changed their display name from SnIcK to logger.07:12:09
@realsnick:matrix.org@realsnick:matrix.org set a profile picture.07:13:12

Show newer messages


Back to Room ListRoom Version: 6