tvl-depot/users/aspen/system/home/modules/development/rust.nix
Florian Klink 248f46e7fc chore(users/aspen): use cargo-* packages from nixpkgs
These started throwing eval warnings due to usage of cargoSha256, and
are both available in nixpkgs.

Change-Id: Ice636bebc0a839410125bc19b2252158add2b96e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12337
Tested-by: BuildkiteCI
Reviewed-by: aspen <root@gws.fyi>
Autosubmit: flokli <flokli@flokli.de>
2024-08-25 21:44:41 +00:00

49 lines
815 B
Nix

{ config, lib, pkgs, ... }:
let
inherit (config.lib) depot;
in
with lib;
{
home.packages = with pkgs; [
rustup
cargo-bloat
cargo-edit
cargo-expand
cargo-hakari
cargo-nextest
cargo-udeps
sccache
evcxr
# benchmarking+profiling
cargo-criterion
cargo-flamegraph
coz
inferno
hotspot
] ++ optionals (stdenv.isLinux) [
cargo-rr
];
programs.zsh.shellAliases = {
"cg" = "cargo";
"cb" = "cargo build";
"ct" = "cargo test";
"ctw" = "fd -e rs | entr cargo test";
"cch" = "cargo check";
};
home.file.".cargo/config".text = ''
[build]
rustc-wrapper = "${pkgs.sccache}/bin/sccache"
[target.x86_64-unknown-linux-gnu]
linker = "clang"
rustflags = ["-C", "link-arg=-fuse-ld=${pkgs.mold}/bin/mold"]
'';
}