49 lines
1.4 KiB
Nix
49 lines
1.4 KiB
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
arduino-sketch-builder-nix.url = "git+https://git.clerie.de/clerie/arduino-sketch-builder-nix.git";
|
|
arduino-esp32 = {
|
|
url = "github:espressif/arduino-esp32/gh-pages";
|
|
flake = false;
|
|
};
|
|
};
|
|
outputs = { self, nixpkgs, arduino-sketch-builder-nix, arduino-esp32, ... }: {
|
|
packages.x86_64-linux = let
|
|
pkgs = import nixpkgs {
|
|
system = "x86_64-linux";
|
|
|
|
overlays = [
|
|
(arduino-sketch-builder-nix.overlay)
|
|
(arduino-sketch-builder-nix.mkArduinoPackageOverlay ./package_index.json)
|
|
(arduino-sketch-builder-nix.mkArduinoPackageOverlay (arduino-esp32 + "/package_esp32_index.json"))
|
|
];
|
|
};
|
|
|
|
arduinoEnv = pkgs.mkArduinoEnv {
|
|
packages = with pkgs.arduinoPackages; [
|
|
platforms.esp32.esp32."2.0.14"
|
|
];
|
|
runtimeInputs = with pkgs; [
|
|
(python3.withPackages(ps: with ps; [ pyserial ]))
|
|
];
|
|
};
|
|
in {
|
|
|
|
inherit arduinoEnv;
|
|
|
|
olimex-esp32-poe = arduinoEnv.buildArduinoSketch {
|
|
name = "olimex-esp32-poe";
|
|
src = ./. + "/olimex-esp32-poe";
|
|
fqbn = "esp32:esp32:esp32-poe-iso";
|
|
};
|
|
|
|
default = self.packages.x86_64-linux.arduinoEnv;
|
|
};
|
|
|
|
hydraJobs = {
|
|
olimex-esp32-poe = self.packages.x86_64-linux.olimex-esp32-poe.binaryTarball;
|
|
};
|
|
};
|
|
}
|
|
|