# Use nixpkgs with oxalica rust-bin overlay let rust_overlay = import (builtins.fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"); nixpkgs = import { overlays = [ rust_overlay ]; }; rust_channel = nixpkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain; in # Avoid typing `nixpkgs.` before each package name with nixpkgs; # Define the shell pkgs.mkShell { buildInputs = [ dfu-util ]; nativeBuildInputs = [ rust_channel # Full rust from overlay, includes cargo ]; }