X-Git-Url: https://git.patrickod.com/tor.noisebridge.net/plain/.gitignore?a=blobdiff_plain;f=flake.nix;fp=flake.nix;h=d9ef43b7348c989cf504bd6731b957e90946f965;hb=0c4201c35eed75b16a44bb5a1054d1a6e9d5e5aa;hp=0000000000000000000000000000000000000000;hpb=99a9806b9b2b042d168f32ae10dd4b89a3295021;p=tincan.git diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..d9ef43b --- /dev/null +++ b/flake.nix @@ -0,0 +1,39 @@ +{ + description = "rust ARM M-0 development"; + inputs = { + nixpkgs.url = "github:patrickod/nixpkgs"; + rust-overlay.url = "github:oxalica/rust-overlay"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }: + flake-utils.lib.eachDefaultSystem (system: + let + overlays = [ (import rust-overlay) ]; + pkgs = import nixpkgs { + inherit system overlays; + }; + rust = pkgs.rust-bin.nightly.latest.default.override { + extensions = [ + "clippy-preview" + "rust-src" + "rustfmt-preview" + "rust-analyzer-preview" + ]; + targets = [ + "thumbv6m-none-eabi" + ]; + }; + in + { + devShell = pkgs.mkShell { + buildInputs = [ + pkgs.gcc-arm-embedded + pkgs.probe-run + pkgs.cargo-hf2 + rust + ]; + }; + } + ); +}