!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

474 Members
Rust115 Servers

Load older messages


SenderMessageTime
3 Sep 2024
@emilazy:matrix.orgemilywhich people can use with rust-overlay/fenix16:25:40
@emilazy:matrix.orgemilyer, the non-dupe, rather. the [v2] one.16:25:49
@qyliss:fairydust.spaceAlyssa RossI do not think it is our responsibility to support years old Rust compilers16:26:27
@emilazy:matrix.orgemilyagreed16:26:33
@emilazy:matrix.orgemilyso, I'm a little confused about the FODs16:27:49
@emilazy:matrix.orgemily do we not use the .cargo/config that fetch-cargo-tarball outputs at all? 16:27:58
@emilazy:matrix.orgemily it seems like we'd need to mv or ln them to avoid the warning unless they're just totally unused as part of the Rust builds? 16:28:13
@qyliss:fairydust.spaceAlyssa Rossthat's what I'm wondering16:28:17
@emilazy:matrix.orgemilyyet more reason opaque FOD bundles with computed stuff that can never be changed are bad :'(16:30:06
* @emilazy:matrix.orgemily bumps Rust rework a couple places up her to-do list16:30:17
@qyliss:fairydust.spaceAlyssa Rossalthough everything in this PR seems good anyway16:31:04
@qyliss:fairydust.spaceAlyssa Rossworst case it only fixes some of the warnings16:31:11
@emilazy:matrix.orgemilyyes, I think we could just merge it and sort out the rest later16:31:16
@emilazy:matrix.orgemilybut it'd be good to understand what's going on and @mmlb probably knows that better than me :)16:31:46
@kranzes:matrix.orgIlan Joselevich (Kranzes)
In reply to @ultranix:matrix.org
I guess crate2nix wont be able to build with something like this https://github.com/paritytech/polkadot-sdk/blob/master/substrate/utils/wasm-builder/src/builder.rs#L54 that reaches out to the root workspace manifest
right? https://github.com/nix-community/crate2nix/commit/14d9c68123ae2d7ee94f91da28f3bf278c5cff0b
can always do some patching and overriding
17:33:34
@emilazy:matrix.orgemily is there any way to .overrideAttrs a Rust package in practice? I've overridden src and cargoDeps but it just complains about the lock file being out of date for reasons I can't fathom. 20:05:24
@emilazy:matrix.orgemilydoing the equivalent patch to the original package file works.20:05:33
@9hp71n:matrix.orgghpzin How did you override cargoDeps ? 20:11:39
@emilazy:matrix.orgemily I tried cargoDeps = prevAttrs.cargoDeps.overrideAttrs { src = <the new src>; outputHash = "…"; } and it was behaving weird. now I'm trying cargoDeps = pkgs.rustPlatform.fetchCargoTarball { … } and it seems like it might be working? 20:15:03
@emilazy:matrix.orgemilyah, I think I figured out what was going wrong. (flake input overrides acting weirdly.)20:19:30
@emilazy:matrix.orgemily is there a nice way to run clippy in nix flake check? 23:19:20
4 Sep 2024
@getchoo:matrix.orggetchoo
stdenv.mkDerivation {
  name = "check-clippy";
  inherit (aRustPackage) src cargoDeps;

  nativeBuildInputs = [ cargo clippy rustPlatform.cargoSetupHook ];

  buildPhase = "cargo clippy";
}

with aRustPackage being a derivation for the project you're running clippy on

01:51:59
@getchoo:matrix.orggetchoothere are probably ways to do this better/re-use more stuff from the parent package like it's native/buildInputs but01:53:24
@getchoo:matrix.orggetchoohopefully you get the idea lol01:53:29
@getchoo:matrix.orggetchoo *
stdenv.mkDerivation {
  name = "check-clippy";
  inherit (aRustPackage) src cargoDeps;

  nativeBuildInputs = [ cargo clippy rustPlatform.cargoSetupHook ];

  buildPhase = "cargo clippy | tee $out";
}

with aRustPackage being a derivation for the project you're running clippy on

01:53:55
@emilazy:matrix.orgemily right, I ended up doing something like that with runCommandCC since asking :) 01:58:10
@emilazy:matrix.orgemilywas just hoping there was something more "native"01:58:14
@emilazy:matrix.orgemily I considered doing an .overrideAttrs and changing all the phases too 01:58:38
@getchoo:matrix.orggetchooit's not a bad option i just hate disabling some other stuff like the install step lol02:03:27
@emilazy:matrix.orgemilyyeah it's annoying02:04:04

Show newer messages


Back to Room ListRoom Version: 6