]> patrickod personal git archive - tincan.git/blob - flake.nix
specify usb,unproven as default features to stop CLI arg repetition
[tincan.git] / flake.nix
1 {
2   description = "rust ARM M-0 development";
3   inputs = {
4     nixpkgs.url      = "github:patrickod/nixpkgs";
5     rust-overlay.url = "github:oxalica/rust-overlay";
6     flake-utils.url  = "github:numtide/flake-utils";
7   };
8
9   outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }:
10     flake-utils.lib.eachDefaultSystem (system:
11       let
12         overlays = [ (import rust-overlay) ];
13         pkgs = import nixpkgs {
14           inherit system overlays;
15         };
16         rust = pkgs.rust-bin.nightly.latest.default.override {
17           extensions = [
18             "clippy-preview"
19             "rust-src"
20             "rustfmt-preview"
21             "rust-analyzer-preview"
22           ];
23           targets = [
24             "thumbv6m-none-eabi"
25           ];
26         };
27       in
28       {
29         devShell = pkgs.mkShell {
30           buildInputs = [
31             pkgs.gcc-arm-embedded
32             pkgs.probe-run
33             pkgs.cargo-hf2
34             rust
35           ];
36         };
37       }
38     );
39 }