It`s a fork of esp32-idf-rust with some changes as detailed below.
- Added
permittedInsecurePackages = [ "python-2.7.18.7" ]
because Python 2 is deprecated and the build fails without it. - Changed the base docker image tag from
all_latest
toesp32_latest
to reduce build time and size. - Updated docker image digest to the latest version to this date (2024-03-14).
flake.nix (devShell)
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
esp32 = {
url = "github:edupsousa/esp32-idf-rust";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
esp32,
}: let
pkgs = import nixpkgs {system = "x86_64-linux";};
idf-rust = esp32.packages.x86_64-linux.esp32;
in {
devShells.x86_64-linux.default = pkgs.mkShell {
buildInputs = [
idf-rust
];
shellHook = ''
export PATH="${idf-rust}/.rustup/toolchains/esp/bin:${idf-rust}/.rustup/toolchains/esp/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin:$PATH"
export RUST_SRC_PATH="$(rustc --print sysroot)/lib/rustlib/src/rust/src"
'';
};
};
}
Run the command below to get the latest image digest and update the flake.nix
file in this repository.
nix run nixpkgs#nix-prefetch-docker -- --image-name espressif/idf-rust --image-tag esp32_latest
Note: You can change the esp32_latest
tag to any other tag you want to use.
Find the available tags here.