46 lines
967 B
Nix
46 lines
967 B
Nix
{
|
|
description = "ESP32-D0WD-V3 (esp32-hal) Rust dev flake";
|
|
|
|
inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; };
|
|
|
|
outputs = { self, nixpkgs }: let
|
|
system = "x86_64-linux";
|
|
pkgs = import nixpkgs { inherit system; };
|
|
in {
|
|
devShells.${system}.default = pkgs.mkShell {
|
|
packages = with pkgs; [
|
|
llvm
|
|
cmake
|
|
ninja
|
|
python3
|
|
pkg-config
|
|
git
|
|
curl
|
|
wget
|
|
unzip
|
|
gcc
|
|
gnumake
|
|
rustup
|
|
cargo-espflash
|
|
espup
|
|
];
|
|
|
|
shellHook = ''
|
|
echo ">>> ESP32 DevShell (esp-hal only)"
|
|
|
|
if [ ! -d "$HOME/.espup" ]; then
|
|
echo "Running espup install..."
|
|
espup install
|
|
fi
|
|
|
|
# Activate Xtensa Rust toolchain
|
|
export RUSTUP_TOOLCHAIN=esp
|
|
export PATH=$HOME/.rustup/toolchains/esp/bin:$PATH
|
|
|
|
echo "Xtensa Rust toolchain ready."
|
|
rustc --version
|
|
'';
|
|
};
|
|
};
|
|
}
|