From 753840e4397bd9314a0ab54be915bacf0cf04424 Mon Sep 17 00:00:00 2001 From: Artem Sheremet Date: Mon, 13 Jul 2026 17:05:42 +0000 Subject: [PATCH] Use esphome from nix, but with bwrap-less override --- .github/workflows/compile-all.yaml | 3 --- flake.nix | 10 ++++------ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/compile-all.yaml b/.github/workflows/compile-all.yaml index e45235e..e06e313 100644 --- a/.github/workflows/compile-all.yaml +++ b/.github/workflows/compile-all.yaml @@ -35,8 +35,5 @@ jobs: key: esphome-${{ hashFiles('*.yaml', 'templates/*.yaml', 'components/**') }} restore-keys: esphome- - # Uses the ci shell, which installs esphome via pipx at the exact version - # pinned in Nix. The ci shell avoids nixpkgs wrapping platformio in bwrap, - # which fails on CI runners that disallow unprivileged user namespaces. - name: Compile All run: nix develop .#ci --command make compile-all diff --git a/flake.nix b/flake.nix index fa79931..d14fe21 100644 --- a/flake.nix +++ b/flake.nix @@ -57,20 +57,18 @@ ''; }; - # CI shell: uses the same esphome version as default, but installs it - # via pipx to avoid nixpkgs wrapping platformio in bwrap, which fails + # CI shell: uses the same esphome version as default, but overrides + # platformio to use platformio-core instead of the FHS-wrapped version. + # This avoids nixpkgs wrapping platformio in bwrap, which fails # on CI runners that disallow unprivileged user namespaces. ci = pkgs.mkShell { buildInputs = with pkgs; [ - python3 - python3Packages.pipx + (esphome.override { platformio = platformio-core; }) esptool gnumake ]; shellHook = '' - pipx install --quiet esphome==${pkgs.esphome.version} - export PATH="$HOME/.local/bin:$PATH" echo -n "ESPHome (CI) " esphome --version '';