nix/docs: drop dead walk helper + dedupe checks.docs eval

argus review notes on #618:

- `walk` in `pickSubtrees` was leftover from an earlier traversal
  design; `pick` does everything we need. drop it.
- `checks.docs` was re-importing `nix/docs.nix` independently of
  `packages.docs`; the comment claimed they shared eval but they
  didn't (nix's lazy eval + import caching made the *result*
  identical, not the eval). switch to `inherit (self.packages.\${system}) docs;`
  so the check is literally the package output, no second import.
This commit is contained in:
atlas 2026-05-29 23:46:39 +02:00
commit 24f61f3386
2 changed files with 8 additions and 20 deletions

View file

@ -90,18 +90,12 @@ let
pickSubtrees =
options: roots:
let
walk =
path: tree:
if path == [ ] then
lib.getAttrFromPath path options
else
lib.setAttrByPath path (lib.getAttrFromPath path tree);
pick =
path:
let
exists = lib.hasAttrByPath path options;
in
if exists then lib.setAttrByPath path (lib.getAttrFromPath path options) else { };
if lib.hasAttrByPath path options then
lib.setAttrByPath path (lib.getAttrFromPath path options)
else
{ };
in
lib.foldl' lib.recursiveUpdate { } (map pick roots);