2020-12-14 03:42:29 +08:00
|
|
|
{ mozillaOverlay ? builtins.fetchTarball "https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz",
|
|
|
|
latestRustNightly ? false,
|
2020-12-09 07:46:31 +08:00
|
|
|
}:
|
|
|
|
let
|
|
|
|
pkgs = import <nixpkgs> {
|
|
|
|
overlays = [ (import mozillaOverlay) ];
|
|
|
|
};
|
2020-12-14 03:42:29 +08:00
|
|
|
rust =
|
|
|
|
if latestRustNightly
|
|
|
|
then pkgs.rustChannelOfTargets "nightly" null [ "thumbv7em-none-eabihf" ]
|
|
|
|
else (pkgs.recurseIntoAttrs (
|
2022-01-05 07:54:07 +08:00
|
|
|
pkgs.callPackage (import <nix-scripts/mcu/rustPlatform.nix>) {}
|
2020-12-14 03:42:29 +08:00
|
|
|
)).rust.cargo;
|
2020-12-09 07:46:31 +08:00
|
|
|
in
|
|
|
|
pkgs.mkShell {
|
|
|
|
name = "thermostat-env";
|
|
|
|
buildInputs = with pkgs; [
|
|
|
|
rust gcc
|
2020-12-13 09:31:19 +08:00
|
|
|
openocd dfu-util
|
2020-12-09 07:46:31 +08:00
|
|
|
] ++ (with python3Packages; [
|
|
|
|
numpy matplotlib
|
|
|
|
]);
|
|
|
|
}
|