-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit cb231f3
Showing
2 changed files
with
124 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; | ||
rust-overlay.url = "github:oxalica/rust-overlay"; | ||
rust-overlay.inputs.nixpkgs.follows = "nixpkgs"; | ||
}; | ||
|
||
outputs = { self, rust-overlay, nixpkgs }: | ||
let | ||
system = "x86_64-linux"; | ||
overlays = [ (import rust-overlay) ]; | ||
pkgs = import nixpkgs { | ||
inherit overlays system; | ||
}; | ||
in | ||
{ | ||
devShells.${system}.default = pkgs.mkShell { | ||
buildInputs = [ | ||
# (pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.default.override { | ||
# targets = [ "thumbv6m-none-eabi" ]; | ||
# extensions = [ "rust-src" ]; | ||
# })) | ||
(pkgs.rust-bin.stable.latest.default.override { | ||
extensions = [ "rust-src" "llvm-tools-preview" ]; | ||
targets = [ "thumbv6m-none-eabi" ]; | ||
}) | ||
pkgs.rust-analyzer | ||
pkgs.flip-link | ||
pkgs.probe-run | ||
pkgs.probe-rs | ||
pkgs.elf2uf2-rs | ||
pkgs.rustfmt | ||
pkgs.cargo-binutils | ||
pkgs.gcc-arm-embedded | ||
# For compile_commands.json, run `bear cargo build -r` at least once | ||
pkgs.bear | ||
# For language server for the C files | ||
pkgs.ccls | ||
]; | ||
}; | ||
}; | ||
} |