thermostat/shell.nix

24 lines
626 B
Nix
Raw Normal View History

{ 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) ];
};
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>) {}
)).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
]);
}