Init repo
This commit is contained in:
43
flake.nix
Normal file
43
flake.nix
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
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;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user