because of fuckery, we are using the oxalica overlay now

This commit is contained in:
Robert Schauklies 2026-01-08 22:08:39 +01:00
parent fbc187f001
commit e3fd07a28e

View file

@ -1,19 +1,28 @@
{ pkgs ? import <nixpkgs> {}}:
let rust-toolchain = with pkgs; symlinkJoin {
name = "rust-toolchain";
paths = [
probe-rs-tools
rustup
rustc
cargo
rustfmt
rust-analyzer
clippy
rustPlatform.rustcSrc
{ pkgs ? import <nixpkgs> {
overlays = [
(import (builtins.fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"))
];
};
in pkgs.mkShell {
buildInputs = [rust-toolchain];
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
RUST_BACKTRACE = 1;
}
}:
let
# Define the specific toolchain with ESP32-C6 support
rustToolchain = pkgs.rust-bin.selectLatestNightlyWith(toolchain: toolchain.default.override {
targets = [ "riscv32imac-unknown-none-elf" ];
extensions = [ "rust-src" "llvm-tools-preview" ];
});
in
pkgs.mkShell {
nativeBuildInputs = [
rustToolchain
pkgs.probe-rs-tools
pkgs.espflash # For flashing your ESP32-C6
pkgs.pkg-config
pkgs.gcc # Critical: provides the 'cc' wrapper script
];
# Injects necessary library paths for the Nix-wrapped linker
shellHook = ''
export LD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath [ pkgs.stdenv.cc.cc ]}"
'';
}