shell.nix for meshtastic

I put this together so I can nix-shell shell.nix and have all the tools I need for building meshtastic. I save this as shell.nix in the firmware 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 build

Or for convenience, I have this justfile:

build:
  pio run

flash:
  esptool.py write_flash 0x00 .pio/build/t-deck/firmware.factory.bin 

Then I can just build or just flash to do the compile or load the new firmware onto the t-deck.

Tags

#nix

#meshtastic

Navigation

index

tags

updated: 2024-07-07 16:14:14

generated: 2024-10-15


Source