mirror of
https://github.com/SlimeVR/SlimeVR-Tracker-ESP.git
synced 2026-04-05 17:51:57 +02:00
* Tests * more changes * Remove the need for nodejs * Better preprocessor and ci * Fix ci maybe * Fix ci maybe * Fix ci maybe * Fix ci maybe + Add way to overide defaults from env vars * Temp fix for api tests * Small override fix * Fix override * More descriptions * More descriptions * Fix led + better typings * Better format * Bring back deleted files * Add all boards in platformio.ini * Always define Battery Pin and R1, R2 and Resistance * Checking Boards Default Config: BOARD_WEMOSD1MINI BOARD_NODEMCU BOARD_ESP01 BOARD_TTGO_TBASE * Format * Correcting Board Defaults: - BOARD_WROOM32 - BOARD_LOLIN_C3_MINI - BOARD_BEETLE32C3 - BOARD_ESP32C3DEVKITM1 - BOARD_ESP32C6DEVKITC1 - BOARD_WEMOSWROOM02 - BOARD_XIAO_ESP32C3 - BOARD_ESP32S3_SUPERMINI * Change IMU_AUTO to something else on boards that might crash with it. * remove IMU_UNKNOWN from selection * Preprocessor fixes * preprocessor defaults fixes + Make glove not use preprocessor --------- Co-authored-by: unlogisch04 <98281608+unlogisch04@users.noreply.github.com>
81 lines
2.4 KiB
Nix
81 lines
2.4 KiB
Nix
{
|
|
description = "PlatformIO development environment";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, flake-utils }:
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
in
|
|
{
|
|
devShells.default = pkgs.mkShell {
|
|
buildInputs = with pkgs; [
|
|
# PlatformIO
|
|
platformio
|
|
platformio-core
|
|
|
|
# Python for PlatformIO with needed packages
|
|
python3
|
|
python3Packages.pip
|
|
python3Packages.virtualenv
|
|
|
|
# Pre-install Python packages that need compilation
|
|
python3Packages.jsonschema
|
|
python3Packages.rpds-py
|
|
python3Packages.attrs
|
|
python3Packages.referencing
|
|
|
|
# Rust toolchain (in case compilation is needed)
|
|
rustc
|
|
cargo
|
|
|
|
# Build tools
|
|
gcc
|
|
gnumake
|
|
cmake
|
|
|
|
# Serial communication
|
|
picocom
|
|
minicom
|
|
|
|
# USB access (for programming devices)
|
|
libusb1
|
|
pkg-config
|
|
];
|
|
|
|
shellHook = ''
|
|
# Set PlatformIO core directory to project-local directory
|
|
export PLATFORMIO_CORE_DIR=$PWD/.nix-platformio
|
|
|
|
# Create and activate Python virtual environment
|
|
if [ ! -d .venv ]; then
|
|
echo "Creating Python virtual environment..."
|
|
python3 -m venv .venv --system-site-packages
|
|
fi
|
|
source .venv/bin/activate
|
|
|
|
# Prefer binary wheels over building from source
|
|
export PIP_PREFER_BINARY=1
|
|
|
|
echo "PlatformIO development environment loaded"
|
|
echo "Python virtual environment activated: .venv"
|
|
echo "PlatformIO version: $(pio --version)"
|
|
echo "Python version: $(python --version)"
|
|
echo ""
|
|
echo "Available commands:"
|
|
echo " pio init - Initialize a new PlatformIO project"
|
|
echo " pio run - Build the project"
|
|
echo " pio run -t upload - Upload to device"
|
|
echo " pio device monitor - Open serial monitor"
|
|
echo " pip install <package> - Install Python packages in venv"
|
|
echo ""
|
|
'';
|
|
};
|
|
}
|
|
);
|
|
}
|