Platformio: Difference between revisions
imported>IgorM m Added to the category "Development" |
imported>Delan update udev and vscode advice |
||
Line 23: | Line 23: | ||
{ | { | ||
services.udev.packages = [ | services.udev.packages = [ | ||
pkgs.platformio | pkgs.platformio-core | ||
pkgs.openocd | pkgs.openocd | ||
]; | ]; | ||
Line 38: | Line 38: | ||
"platformio-ide.useBuiltinPIOCore": false, | "platformio-ide.useBuiltinPIOCore": false, | ||
} | } | ||
</syntaxHighlight> | |||
[https://discourse.nixos.org/t/how-to-use-platformio-with-vscode/15805/3 As of PlatformIO IDE 2.0.0], you will need a shell that allows the extension to run “python -m platformio” ([https://github.com/NixOS/nixpkgs/pull/237313 #237313]): | |||
<syntaxHighlight lang=nix> | |||
{ pkgs ? import (builtins.fetchTarball { | |||
# NixOS/nixpkgs#237313 = ppenguin:refactor-platformio-fix-ide | |||
url = "https://github.com/NixOS/nixpkgs/archive/3592b10a67b518700002f1577e301d73905704fe.tar.gz"; | |||
}) {}, | |||
}: | |||
let | |||
envname = "platformio-fhs"; | |||
mypython = pkgs.python3.withPackages (ps: with ps; [ platformio ]); | |||
in | |||
(pkgs.buildFHSUserEnv { | |||
name = envname; | |||
targetPkgs = pkgs: (with pkgs; [ | |||
platformio-core | |||
mypython | |||
openocd | |||
]); | |||
# NixOS/nixpkgs#263201, NixOS/nixpkgs#262775, NixOS/nixpkgs#262080 | |||
runScript = "env LD_LIBRARY_PATH= bash"; | |||
}).env | |||
</syntaxHighlight> | </syntaxHighlight> | ||