2019-03-20 04:18:26 +08:00
|
|
|
{ recurseIntoAttrs, stdenv, lib,
|
2019-03-20 05:24:02 +08:00
|
|
|
makeRustPlatform,
|
2019-03-20 04:18:26 +08:00
|
|
|
fetchurl, patchelf,
|
2019-03-20 05:12:28 +08:00
|
|
|
rustManifest ? ./channel-rust-nightly.toml
|
2019-03-20 04:18:26 +08:00
|
|
|
}:
|
2019-03-07 23:27:33 +08:00
|
|
|
|
|
|
|
let
|
|
|
|
targets = [
|
|
|
|
# "x86_64-unknown-linux-gnu"
|
|
|
|
# "thumbv6m-none-eabi"
|
2019-03-20 04:18:26 +08:00
|
|
|
# "thumbv7m-none-eabi"
|
2019-03-07 23:27:33 +08:00
|
|
|
# "thumbv7em-none-eabi"
|
|
|
|
"thumbv7em-none-eabihf"
|
|
|
|
];
|
2019-03-20 04:18:26 +08:00
|
|
|
rustChannel =
|
2019-03-20 05:12:28 +08:00
|
|
|
lib.rustLib.fromManifestFile rustManifest {
|
2019-03-20 04:18:26 +08:00
|
|
|
inherit stdenv fetchurl patchelf;
|
|
|
|
};
|
|
|
|
rust =
|
2019-03-20 05:24:02 +08:00
|
|
|
rustChannel.rust.override {
|
|
|
|
inherit targets;
|
|
|
|
};
|
2019-03-07 23:27:33 +08:00
|
|
|
in
|
|
|
|
makeRustPlatform {
|
|
|
|
rustc = rust;
|
|
|
|
cargo = rust;
|
|
|
|
}
|