add flake.nix

This commit is contained in:
arne 2025-10-04 09:58:24 +02:00
commit 42f633e12f
4 changed files with 147 additions and 0 deletions

35
flake.nix Normal file
View file

@ -0,0 +1,35 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
systems.url = "github:nix-systems/default-linux";
esp-idf.url = "github:mirrexagon/nixpkgs-esp-dev?rev=6c34f2436015eb6c107970d9b88f3d5d4600c6fa";
};
outputs = { nixpkgs, systems, esp-idf, ... }: let
inherit (nixpkgs) lib;
eachSystem = lib.genAttrs (import systems);
pkgsFor = eachSystem (system:
import nixpkgs {
inherit system;
});
in {
devShells = eachSystem(system: let
inherit (esp-idf.packages.${system}) esp-idf-esp32;
pkgs = pkgsFor.${system};
in {
default = pkgs.mkShell {
inputsFrom = [
# for building and flashing the sketch
esp-idf-esp32
];
packages = [
esp-idf-esp32
# for the `fontconvert.py` script of epdiy
(pkgs.python3.withPackages(ps: [ps.freetype-py]))
];
};
});
};
}