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  {};

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 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.

Update: in the future I would learn I can set the environment without editing the platformio.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

=> #meshtastic

Navigation

=> index | tags

created: 2024-07-07

(re)generated: 2025-01-29

Proxy Information
Original URL
gemini://thatit.be/2024-07-07-14-20-59.gmi
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
505.313346 milliseconds
Gemini-to-HTML Time
0.580317 milliseconds

This content has been proxied by September (3851b).