thermostat/shell.nix

24 lines
628 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 (
pkgs.callPackage (import <nix-scripts/stm32/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
]);
}