-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
62 lines (54 loc) · 1.65 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
{
description = "Ledka";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
esp-dev = {
url = "github:mirrexagon/nixpkgs-esp-dev";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{ flake-parts, esp-dev, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" "aarch64-darwin" ];
perSystem = { config, self', inputs', pkgs, system, ... }:
let
fonts = pkgs.fetchzip {
url =
"https://jared.geek.nz/2014/01/custom-fonts-for-microcontrollers/files/fonts.zip";
sha256 = "U3QX4oOECN05tvOcsp7dFWL5x21fzu2IdLN7D2EkUkg=";
};
python = pkgs.python3.withPackages (p: [ p.pillow ]);
in {
devShells.build = pkgs.mkShell {
IDF_CCACHE_ENABLE = 1;
hardeningDisable = [ "all" ];
buildInputs = [
esp-dev.packages.${system}.esp-idf-full
pkgs.esptool-ck
pkgs.ccache
];
# Workaround since esp-idf brings own python
PYTHON_FONTGEN = "${python}/bin/python";
FONT_PATH = fonts;
};
devShells.default = pkgs.mkShell {
hardeningDisable = [ "all" ];
buildInputs = [
# C
pkgs.bear
pkgs.clang-tools
pkgs.cmake-format
# Python
python
pkgs.black
pkgs.pyright
# Nix
pkgs.nixfmt-classic
# Tools
pkgs.picocom
];
FONT_PATH = fonts;
};
};
};
}