Explain runtimeInputs for special platforms
This commit is contained in:
24
README.md
24
README.md
@@ -46,6 +46,10 @@ From the indexes you create overlays which then make the Arduino packages and li
|
||||
(arduino-nix.mkArduinoPackageOverlay (arduino-package-index + "/package_index.json"))
|
||||
(arduino-nix.mkArduinoPackageOverlay (arduino-package-rp2040-index + "/package_rp2040_index.json"))
|
||||
(arduino-nix.mkArduinoLibraryOverlay (arduino-library-index + "/library_index.json"))
|
||||
(arduino-nix.mkArduinoPackageOverlay (pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/espressif/arduino-esp32/8bae7e23376c6087a55e46456049ae6d73b72e16/package_esp32_index.json";
|
||||
hash = "sha256-0kvZeRDtE/JKJes86omyN4cf4HWfX68P7xPfE+BvTC8=";
|
||||
}))
|
||||
];
|
||||
in
|
||||
(flake-utils.lib.eachDefaultSystem (system:
|
||||
@@ -54,7 +58,7 @@ From the indexes you create overlays which then make the Arduino packages and li
|
||||
inherit system overlays;
|
||||
};
|
||||
|
||||
// arduinoEnv provides bin/arduino-cli and some useful helpers functions
|
||||
# arduinoEnv provides bin/arduino-cli and some useful helpers functions
|
||||
arduinoEnv = pkgs.makeArduinoEnv {
|
||||
libraries = with pkgs.arduinoLibraries; [
|
||||
(arduino-nix.latestVersion ADS1X15)
|
||||
@@ -69,6 +73,18 @@ From the indexes you create overlays which then make the Arduino packages and li
|
||||
platforms.rp2040.rp2040."2.3.3"
|
||||
];
|
||||
};
|
||||
|
||||
arduinoEnvESP32 = pkgs.makeArduinoEnv {
|
||||
packages = with pkgs.arduinoPackages; [
|
||||
platforms.esp32.esp32."2.0.14"
|
||||
];
|
||||
|
||||
# ESP32 tools require python with some custom dependencies
|
||||
# we can provide them via runtimeInputs
|
||||
runtimeInputs = with pkgs; [
|
||||
(python3.withPackages(ps: with ps; [ pyserial ]))
|
||||
];
|
||||
};
|
||||
in rec {
|
||||
packages = {
|
||||
inherit arduinoEnv;
|
||||
@@ -78,6 +94,12 @@ From the indexes you create overlays which then make the Arduino packages and li
|
||||
src = ./. + "/my-rp2040-project";
|
||||
fqbn = "arduino:mbed_rp2040:pico";
|
||||
};
|
||||
|
||||
my-esp32-poe-iso-project = arduinoEnvESP32.buildArduinoSketch {
|
||||
name = "my-esp32-poe-iso-project";
|
||||
src = ./. + "/my-esp32-poe-iso-project";
|
||||
fqbn = "esp32:esp32:esp32-poe-iso";
|
||||
};
|
||||
}
|
||||
));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user