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> {}}:
|
||||
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 ]}"
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue