2019-03-20 04:18:26 +08:00
|
|
|
{ recurseIntoAttrs, stdenv, lib,
|
|
|
|
makeRustPlatform, rustChannelOfTargets,
|
|
|
|
fetchurl, patchelf,
|
|
|
|
restrictedManifest ? false
|
|
|
|
}:
|
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 =
|
|
|
|
lib.rustLib.fromManifestFile ./channel-rust-nightly.toml {
|
|
|
|
inherit stdenv fetchurl patchelf;
|
|
|
|
};
|
|
|
|
rust =
|
|
|
|
if restrictedManifest
|
|
|
|
then
|
|
|
|
rustChannel.rust.override { inherit targets; }
|
|
|
|
else
|
|
|
|
rustChannelOfTargets "nightly" null targets;
|
2019-03-07 23:27:33 +08:00
|
|
|
in
|
|
|
|
makeRustPlatform {
|
|
|
|
rustc = rust;
|
|
|
|
cargo = rust;
|
|
|
|
}
|