anykey-firmware/shell.nix

21 lines
533 B
Nix

# 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 <nixpkgs> { 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
];
}