1
0
Fork 0
mirror of https://github.com/ryanccn/flake.git synced 2025-12-06 08:10:43 +01:00

fix(rust): adopt sccache again

This commit is contained in:
Ryan Cao 2024-02-14 15:26:06 +08:00
parent bb39b10e1f
commit 426718a435
Signed by: ryanccn
SSH key fingerprint: SHA256:NtP/BlVhoQq4xU6BEcZeT8nIPvHntkJ3lIc2yB+F09E
3 changed files with 41 additions and 42 deletions

View file

@ -1,15 +1,27 @@
{
pkgs,
config,
lib,
...
}: let
toml = pkgs.formats.toml {};
in {
home.file.".cargo/config.toml".source = toml.generate "config.toml" {
build.target-dir = "${config.home.homeDirectory}/.cargo/target";
build.rustc-wrapper = "${lib.getExe' pkgs.sccache "sccache"}";
};
home.packages = with pkgs; [
(fenix.combine (
with fenix;
with stable; [
cargo
rustc
rustfmt
clippy
rust-src
targets.wasm32-unknown-unknown.stable.rust-std
]
))
cargo-bloat
cargo-cache
cargo-deny