tvl-depot/users/grfn/system/home/modules/development/rust.nix
Vincent Ambo e3c5eb3313 chore(3p/sources): bump nixpkgs channels & overlays
* 3p/buzz: delete package

  This is unused, old, and uses an insecure version of OpenSSL which
  broke eval.

* 3p/overlays: remove nvd patch

  Newer versions of nvd are compatible with Nix 2.3 by default.

* users/grfn/system/home: remove explicit rust-analyser package

  This conflicts with `rustup`, causing eval failures, as the wrapper
  seems to now be included in `rustup` by default.

* users/grfn/system: temporarily disable ISO builds

  They were broken upstream in nixpkgs by a change to stdenv/setup.sh,
  being fixed in https://github.com/NixOS/nixpkgs/pull/234883

Change-Id: I0eea99ec98f4e73e615c012ffae1d0e37122e73b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8585
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: tazjin <tazjin@tvl.su>
2023-05-30 13:27:52 +00:00

45 lines
811 B
Nix

{ config, lib, pkgs, ... }:
let
inherit (config.lib) depot;
in
{
home.packages = with pkgs; [
rustup
cargo-edit
cargo-expand
cargo-rr
cargo-udeps
cargo-bloat
sccache
evcxr
depot.users.grfn.pkgs.cargo-hakari
depot.users.grfn.pkgs.cargo-nextest
# benchmarking+profiling
cargo-criterion
cargo-flamegraph
coz
inferno
hotspot
];
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"]
'';
}