Files
esphome/flake.nix
T
artem 49de1f1934
Compile All / compile (push) Failing after 1m38s
Revert to previous esphome version
2026-07-12 15:20:23 +00:00

63 lines
1.4 KiB
Nix

{
description = "esphome deployment shell";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
fw_nix = {
url = "github:futureware-tech/nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
nixpkgs,
fw_nix,
}:
let
forAllSystems =
f:
nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed (
system:
f {
inherit system;
pkgs = import nixpkgs { inherit system; };
}
);
in
{
checks = forAllSystems (
{ system, ... }: {
pre-commit-check = fw_nix.inputs.git-hooks.lib.${system}.run {
src = ./.;
hooks = fw_nix.lib.pre-commit.hooks // {
# Disable check-yaml because it fails on ESPHome's custom YAML tags (like !include, !secret)
check-yaml.enable = false;
};
};
}
);
devShells = forAllSystems (
{ system, pkgs, ... }:
{
default = pkgs.mkShell {
buildInputs = with pkgs; [
esphome
esptool
cc2538-bsl
gnumake
];
shellHook = ''
${self.checks.${system}.pre-commit-check.shellHook}
echo -n "ESPHome "
esphome --version
'';
};
}
);
};
}