Skip to content

Resolve bundled plugins from flake input instead of hardcoded rev#71

Draft
dansanduleac wants to merge 1 commit intoopenclaw:mainfrom
dansanduleac:fix/steipete-tools-from-flake-input
Draft

Resolve bundled plugins from flake input instead of hardcoded rev#71
dansanduleac wants to merge 1 commit intoopenclaw:mainfrom
dansanduleac:fix/steipete-tools-from-flake-input

Conversation

@dansanduleac
Copy link

Summary

  • Replaces the hardcoded stepieteRev/stepieteNarHash in lib.nix with direct sub-flake evaluation from the nix-steipete-tools flake input
  • Eliminates not writing modified lock file warnings caused by builtins.getFlake on sub-flakes without committed flake.lock files
  • Allows downstream consumers to override nix-steipete-tools via the standard flake follows mechanism

Approach

  • Introduces a bundled: URI scheme: lib.nix produces bundled:steipete/<tool> source strings
  • plugins.nix handles these by importing and evaluating the sub-flake directly from the nix-steipete-tools source tree, bypassing builtins.getFlake entirely
  • Custom (non-bundled) plugins continue using builtins.getFlake as before
  • The nix-steipete-tools input is threaded through the module system via the standard closure pattern

Dependencies

Test plan

  • nix flake check passes with no not writing modified lock file warnings
  • Verify bundled plugin resolution works end-to-end on Linux (summarize, goplaces, etc.)
  • Verify custom plugins still resolve via builtins.getFlake

🤖 Generated with Claude Code

@dansanduleac
Copy link
Author

The CI failures (check ci [x86_64-linux] and check ci [aarch64-darwin]) are pre-existing on main — the config-validity check fails with:

Missing validation module: .../dist/config/validation.js

This is unrelated to the changes in this PR. The Evaluate flake.nix check passes.

Replace hardcoded rev/narHash in lib.nix with direct sub-flake
evaluation from the nix-steipete-tools flake input. This:

- Eliminates "not writing modified lock file" warnings caused by
  builtins.getFlake on sub-flakes without committed flake.lock files
- Allows downstream consumers to override nix-steipete-tools via the
  standard flake input/follows mechanism instead of being pinned to a
  hardcoded revision
- Introduces a "bundled:" URI scheme in plugins.nix that imports and
  evaluates sub-flakes directly from the source tree

The nix-steipete-tools input is threaded to the HM module via
_module.args.steipeteToolsInput, set once at the flake output level.
Only lib.nix and plugins.nix (which are plain Nix files, not modules)
receive it via explicit function arguments.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@dansanduleac dansanduleac force-pushed the fix/steipete-tools-from-flake-input branch from 850673d to d17cc76 Compare March 1, 2026 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant