{ rust-bin, mkShell }: mkShell { strictDeps = true; packages = [ # Derivations in `rust-stable` provide the toolchain, # must be listed first to take precedence over nightly. (rust-bin.stable.latest.minimal.override { extensions = [ "rust-src" "rust-docs" "clippy" ]; }) # Use rustfmt, and other tools that require nightly features. (rust-bin.selectLatestNightlyWith (toolchain: toolchain.minimal.override { extensions = [ "rustfmt" "rust-analyzer" ]; })) ]; }