Platformio: Difference between revisions
formatting |
m Update the udev rules as per latest error messages from platformio. Use the `with pkgs;` nix style |
||
Line 3: | Line 3: | ||
== Basic development environment == | == Basic development environment == | ||
< | <syntaxhighlight lang="nix"> | ||
{ pkgs ? import <nixpkgs> {} }: | { pkgs ? import <nixpkgs> {} }: | ||
let | let | ||
in | in | ||
pkgs.mkShell { | pkgs.mkShell { | ||
buildInputs = [ | buildInputs = with pkgs; [ | ||
platformio | |||
# optional: needed as a programmer i.e. for esp32 | # optional: needed as a programmer i.e. for esp32 | ||
avrdude | |||
]; | ]; | ||
} | } | ||
</ | </syntaxhighlight> | ||
== NixOS == | == NixOS == | ||
Line 20: | Line 20: | ||
Add the required udev rules. | Add the required udev rules. | ||
< | <syntaxhighlight lang="nix"> | ||
{ | { | ||
services.udev.packages = [ | services.udev.packages = with pkgs; [ | ||
platformio-core.udev | |||
openocd | |||
]; | ]; | ||
} | } | ||
</ | </syntaxhighlight> | ||
== Use in vscode == | == Use in vscode == |