-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
42 lines (41 loc) · 1.24 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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
];
};
};
}