From 6c66db9b88165d01b3494bdbab10b57c2f1ce5ed Mon Sep 17 00:00:00 2001 From: Bernardo Magri Date: Fri, 29 May 2026 22:27:15 +0100 Subject: [PATCH] ci: realize walker src via nix build to prime cold store MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Diagnosed the persistent "path '…-source' is not valid": it's walker's flake reading its own source at eval time — importTOML resources/config.toml in its home-manager module and lib.fileset.toSource for the package src. On a cold store the walker input source isn't materialized, and neither --no-build flake check nor `nix flake archive` makes the fileset-derived src readable. Replace the archive step with a `nix build` of walker's src attribute, which eagerly realizes it (and the input it reads from) so the subsequent flake check / eval matrix find every path valid. Co-Authored-By: Claude Opus 4.8 --- .gitea/workflows/check.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/check.yml b/.gitea/workflows/check.yml index a3ea21d..c2d6f30 100644 --- a/.gitea/workflows/check.yml +++ b/.gitea/workflows/check.yml @@ -70,15 +70,19 @@ jobs: curl -L "https://releases.nixos.org/nix/nix-${NIX_VERSION}/install" | sh -s -- --no-daemon echo "$HOME/.nix-profile/bin" >> "$GITHUB_PATH" - - name: Materialize flake inputs into the store - # Nix keeps flake-input sources in a git cache and only materialises - # the `-source` store paths lazily. Stylix/base16.nix do - # import-from-derivation (readFile out of those sources) during eval, - # which needs them as real store paths — on a cold CI store that - # fails with "path '…-source' is not valid" (works locally only - # because prior builds already materialised them). `flake archive` - # copies every transitive input into the store up front. - run: nix flake archive + - name: Materialize flake-input sources for eval + # Walker's flake reads its own source tree during evaluation: + # importTOML resources/config.toml in its home-manager module and + # lib.fileset.toSource for the package src (cargoLock.lockFile = + # "${src}/Cargo.lock"). On a cold store the input source isn't + # materialised, so flake check / eval die with "path '…-source' is + # not valid" (works locally only because prior builds materialised + # it; `nix flake archive` reports the input but doesn't make the + # fileset-derived src readable). `nix build` of walker's src + # eagerly realises it — and the input it reads from — priming the + # store so the later eval steps find every path valid. + run: | + nix build --no-link --impure --expr 'let f = builtins.getFlake (toString ./.); in f.inputs.walker.packages.${builtins.currentSystem}.default.src' - name: nix flake check --no-build run: nix flake check --no-build