From bfb86f82df5e803e83d612a6b4e6ceebe8963e63 Mon Sep 17 00:00:00 2001 From: Daniel Noland Date: Sun, 23 Aug 2026 17:54:58 -0600 Subject: [PATCH] build(nix): name the rustup profile so the toolchain stops carrying rust-docs Verified by set-diffing the joined component paths of the three variants: the resulting toolchain differs from today's by rust-docs and nothing else. Every rust-built store path in the dev shell changes hash, so the first CI run after this repopulates that half of the cache. Co-Authored-By: Claude Opus 5 (1M context) Signed-off-by: Daniel Noland --- nix/overlays/llvm.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nix/overlays/llvm.nix b/nix/overlays/llvm.nix index 334be96d21..4201d0f6f2 100644 --- a/nix/overlays/llvm.nix +++ b/nix/overlays/llvm.nix @@ -30,13 +30,19 @@ let }) final.llvmPackages'.stdenv; # note: rust-bin comes from oxa's overlay, not nixpkgs. This overlay only works if you have a rust overlay as well. rust-toolchain = final.pkgsBuildHost.rust-bin.fromRustupToolchain { + # `components` are extensions *on top of* a profile, and the profile + # defaults to rustup's `default`, which already carries rust-docs. Deleting + # "rust-docs" from the list below therefore removes nothing by itself -- the + # profile has to be named too, or the default puts it straight back. That + # is 727MB of prebuilt HTML nothing in CI reads, in the closure every + # dev-shell job pulls over the network into a cold /nix. + profile = "minimal"; channel = if nightly == "true" then "nightly" else sources.rust.version; components = [ "cargo" "clippy" "llvm-tools" "rust-analyzer" - "rust-docs" "rust-src" "rust-std" "rustc"