because of fuckery, we are using the oxalica overlay now
This commit is contained in:
parent
fbc187f001
commit
e3fd07a28e
1 changed files with 26 additions and 17 deletions
|
|
@ -1,19 +1,28 @@
|
||||||
{ pkgs ? import <nixpkgs> {}}:
|
{ pkgs ? import <nixpkgs> {
|
||||||
let rust-toolchain = with pkgs; symlinkJoin {
|
overlays = [
|
||||||
name = "rust-toolchain";
|
(import (builtins.fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"))
|
||||||
paths = [
|
|
||||||
probe-rs-tools
|
|
||||||
rustup
|
|
||||||
rustc
|
|
||||||
cargo
|
|
||||||
rustfmt
|
|
||||||
rust-analyzer
|
|
||||||
clippy
|
|
||||||
rustPlatform.rustcSrc
|
|
||||||
];
|
];
|
||||||
};
|
}
|
||||||
in pkgs.mkShell {
|
}:
|
||||||
buildInputs = [rust-toolchain];
|
|
||||||
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
|
let
|
||||||
RUST_BACKTRACE = 1;
|
# 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 ]}"
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue