thermostat/nix/rustPlatform.nix

28 lines
528 B
Nix
Raw Normal View History

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