feat: add icons and command tools (like nix)

This commit is contained in:
eric
2026-03-15 15:48:51 +01:00
parent dc475afcd1
commit 00fb6ef297
8 changed files with 760 additions and 108 deletions

View File

@@ -136,15 +136,26 @@ Preferred shape in `perSystem.tools`:
})
```
For a tool that should come from the host `PATH` instead of `nixpkgs`:
```nix
(repo-lib.lib.tools.fromCommand {
name = "Nix";
command = "nix";
version.args = [ "--version" ];
})
```
Helper:
```nix
repo-lib.lib.tools.simple "Nix" pkgs.nix [ "--version" ]
repo-lib.lib.tools.simple "Go" pkgs.go [ "version" ]
```
Tool behavior:
- Tool packages are added to the shell automatically.
- Command-backed tools are probed from the existing `PATH` and are not added to the shell automatically.
- Banner probing uses absolute executable paths.
- `required = true` by default.
- Required tool probe failure aborts shell startup.