-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
66 lines (58 loc) · 1.44 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
esp-dev = {
url = "github:thiskappaisgrey/nixpkgs-esp-dev-rust";
inputs.nixpkgs.follows = "nixpkgs";
};
rust-overlay.url = "github:oxalica/rust-overlay";
};
outputs =
{ self
, nixpkgs
, esp-dev
, rust-overlay
,
}:
let
pkgs = import nixpkgs {
system = "x86_64-linux";
overlays = [ esp-dev.overlay (import rust-overlay) ];
};
in
{
devShells.x86_64-linux.default = pkgs.mkShell {
buildInputs = with pkgs; [
gcc-riscv32-esp32c3-elf-bin
openocd-esp32-bin
# Tools required to use ESP-IDF.
git
wget
gnumake
flex
bison
gperf
pkg-config
ninja
libclang
ncurses5
python3
python3Packages.pip
python3Packages.virtualenv
libudev-zero
ldproxy
(rust-bin.selectLatestNightlyWith (toolchain: toolchain.default.override {
extensions = [ "rust-src" ];
targets = [ "wasm32-unknown-unknown" ];
}))
espflash
openssl
trunk
];
shellHook = ''
export LD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath [ pkgs.libxml2 pkgs.zlib pkgs.stdenv.cc.cc.lib ]}"
export LIBCLANG_PATH=${pkgs.libclang.lib}/lib
'';
};
};
}