Skip to content
This repository was archived by the owner on May 28, 2026. It is now read-only.

Add up namespace via overlay#9

Open
lucperkins wants to merge 2 commits into
mainfrom
update-overlay
Open

Add up namespace via overlay#9
lucperkins wants to merge 2 commits into
mainfrom
update-overlay

Conversation

@lucperkins

@lucperkins lucperkins commented May 26, 2026

Copy link
Copy Markdown
Member

Neither pkgs.mk* nor pkgs.lib.mk* feels quite right. I like the idea of providing a pkgs.up namespace via the overlay.

Summary by CodeRabbit

  • Documentation

    • Updated README and examples to reflect revised helper usage and a renamed benchmark example.
  • Refactor

    • Example flakes and exported helpers adjusted to use the new helper namespace and overlay shape; examples and task/runner/watch references updated accordingly.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 26, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The PR restructures the flake overlay to expose an up attribute, switches example usage to pkgs.up.* helpers (process trees, task runners, watch tasks, tool wrappers), updates README examples accordingly, and renames the benchmark export from mkBenchmarkTask to mkBenchmark.

Changes

Namespace migration from pkgs.lib. to pkgs.up.**

Layer / File(s) Summary
Overlay restructuring to expose up attribute
flake.nix
The flake overlay now exposes an up attribute produced by import ./lib with lib and pkgs from final, replacing the prior merge-into-prev.lib behavior.
Example flake migration to pkgs.up. namespace*
example/flake.nix
Binds lib from inputs.nixpkgs, uses lib.genAttrs for per-system generation, and replaces pkgs.lib.mkProcessTree, pkgs.lib.mkTaskRunner, and pkgs.lib.mkWatch with pkgs.up.mkProcessTree, pkgs.up.mkTaskRunner, and pkgs.up.mkWatch.
README documentation examples update
README.md
Updated documented example calls to use pkgs.up.* instead of pkgs.lib.* across Process trees, Task runners, Task runner attributes, Benchmark tasks (also renamed helper from mkBenchmarkTaskmkBenchmark), Watch tasks, and Tools.
Benchmark export rename and message update
lib/benchmark.nix, lib/default.nix
Renamed the exported benchmark builder from mkBenchmarkTask to mkBenchmark in lib/default.nix and updated the assertion message in lib/benchmark.nix to reference mkBenchmark.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 From lib to up I bound the thread,

hopping through flakes where imports spread.
Examples follow, call sites realigned,
benchmark renamed, assertions signed.
A tiny hop — the namespace refined.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the primary change: introducing a pkgs.up namespace through an overlay mechanism, which is the core objective of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch update-overlay

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
README.md (1)

17-17: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update setup text to pkgs.up.* namespace.

Line 17 still references lib.mkTaskRunner/lib.mkProcessTree, but the overlay now exposes helpers under pkgs.up.*. This setup sentence is currently misleading.

Suggested doc fix
-This provides the [`lib.mkTaskRunner`](`#task-runners`), [`lib.mkProcessTree`](`#process-trees`), and other functions that you'll see below.
+This provides the [`pkgs.up.mkTaskRunner`](`#task-runners`), [`pkgs.up.mkProcessTree`](`#process-trees`), and other functions that you'll see below.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` at line 17, Update the README setup sentence that references
lib.mkTaskRunner and lib.mkProcessTree to use the new overlay namespace
pkgs.up.* (e.g., replace mentions of lib.mkTaskRunner and lib.mkProcessTree with
pkgs.up.mkTaskRunner and pkgs.up.mkProcessTree or the appropriate pkgs.up helper
names) so the documentation matches the current exports.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@README.md`:
- Line 17: Update the README setup sentence that references lib.mkTaskRunner and
lib.mkProcessTree to use the new overlay namespace pkgs.up.* (e.g., replace
mentions of lib.mkTaskRunner and lib.mkProcessTree with pkgs.up.mkTaskRunner and
pkgs.up.mkProcessTree or the appropriate pkgs.up helper names) so the
documentation matches the current exports.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a341529e-7e3e-4b54-bc94-45a95a790799

📥 Commits

Reviewing files that changed from the base of the PR and between cef82b0 and b8f0e6f.

📒 Files selected for processing (3)
  • README.md
  • lib/benchmark.nix
  • lib/default.nix
✅ Files skipped from review due to trivial changes (1)
  • lib/benchmark.nix

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant