diff --git a/.gitignore b/.gitignore index 8a451b7..2df0c09 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ result dump.txt flake.lock *~ - +Platformio - NixOS Wiki* +.platformio/ diff --git a/flake.nix b/flake.nix index 8f9a28f..d3fca9c 100644 --- a/flake.nix +++ b/flake.nix @@ -101,15 +101,27 @@ nativeBuildInputs = with pkgs; [ bashInteractive git + pkgs.nixd + ]; + + packages = with pkgs; [ + platformio-core + (writeShellScriptBin "python" '' + if [ "$1" = "-m" ] && [ "$2" = "platformio" ]; then + shift 2 + exec ${platformio-core}/bin/platformio "$@" + fi + exec ${python3}/bin/python3 "$@" + '') + openocd + avrdude ]; shellHook = '' export EDITOR=vim + export PLATFORMIO_CORE_DIR="$PWD/.platformio" ''; - buildInputs = with pkgs; [ - rnix-lsp - ]; }; };