48 lines
1.4 KiB
Nix
48 lines
1.4 KiB
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
arduino-nix.url = "github:clerie/arduino-nix/clerie/arduino-env";
|
|
};
|
|
outputs = { self, nixpkgs, arduino-nix, ... }: {
|
|
packages.x86_64-linux = let
|
|
pkgs = import nixpkgs {
|
|
system = "x86_64-linux";
|
|
|
|
overlays = [
|
|
(arduino-nix.overlay)
|
|
(arduino-nix.mkArduinoPackageOverlay ./package_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=";
|
|
}))
|
|
];
|
|
};
|
|
|
|
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;
|
|
};
|
|
};
|
|
}
|
|
|