shell.nix for meshtastic
I put this together so I can T383838nix-shell shell.nix and have all the tools I need for building meshtastic. I save this as T383838shell.nix in the T383838firmware repository root:
with import <nixpkgs> {};
mkShell {
buildInputs = [
platformio
pkg-config
python311
python3Packages.pip
python3Packages.protobuf
python3Packages.grpcio
python3Packages.grpcio-tools
esptool
just
];
}
Then I can do stuff like:
nix-shell shell.nix
pio run
Or for convenience, I have this T383838justfile:
build:
pio run
flash:
esptool.py write_flash 0x00 .pio/build/t-deck/firmware.factory.bin
Then I can T383838just build or T383838just flash to do the compile or load the new firmware onto the t-deck.
Update: in the future I would learn I can set the environment without editing the T383838platformio.ini file. For example, I can do this:
pio run -e t-deck
And that builds t-deck firmware. Insert any other supported board package and it builds for that.
Tags: nix, meshtastic
Tags
Navigation