ENC424J600/nix/rustPlatform.nix
Harry Ho d399ebc3df Add nix-shell for Rust with OpenOCD & ITM; tcp example IP can be changed
* The user can now run a Nix shell to run the examples, OpenOCD and `itmdump` with Shell script binaries; use `run-help` for the list of these binaries.
* This includes a `itmdump` v0.3.1 binary re-compiled with patches for Rust >=1.41.0.
2020-06-24 15:38:57 +08:00

25 lines
481 B
Nix

{ recurseIntoAttrs, stdenv, lib,
makeRustPlatform, defaultCrateOverrides,
fetchurl, patchelf,
rustManifest ? ./channel-rust-nightly.toml
}:
let
targets = [
"thumbv7em-none-eabihf" # For ARM Cortex-M4 or M7 w/ FPU support
];
rustChannel =
lib.rustLib.fromManifestFile rustManifest {
inherit stdenv fetchurl patchelf;
};
rust =
rustChannel.rust.override {
inherit targets;
};
in
makeRustPlatform {
rustc = rust;
cargo = rust;
}