init nix-stepiete-tools with summarize

This commit is contained in:
Josh Palmer 2026-01-04 13:16:38 +01:00
commit 0dae140c3c
8 changed files with 151 additions and 0 deletions

25
README.md Normal file
View File

@ -0,0 +1,25 @@
# nix-stepiete-tools
Nix packaging for Peter Steinberger's tools, with per-tool clawdbot plugins.
Darwin-only for now (aarch64-darwin).
## Usage (clawdbot plugins)
Each tool is a subflake under `tools/<tool>` and exposes `clawdbotPlugin`.
Example (summarize):
```nix
plugins = [
{ source = "github:clawdbot/nix-stepiete-tools?dir=tools/summarize"; }
];
```
## Packages (root flake)
You can also import packages directly from the root flake:
```nix
inputs.nix-stepiete-tools.packages.${pkgs.system}.summarize
```

27
flake.lock generated Normal file
View File

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1767364772,
"narHash": "sha256-fFUnEYMla8b7UKjijLnMe+oVFOz6HjijGGNS1l7dYaQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "16c7794d0a28b5a37904d55bcca36003b9109aaa",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

25
flake.nix Normal file
View File

@ -0,0 +1,25 @@
{
description = "Nix packaging for steipete tools (clawdbot)";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
outputs = { self, nixpkgs }:
let
systems = [ "aarch64-darwin" ];
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
in {
packages = forAllSystems (system:
let
pkgs = import nixpkgs { inherit system; };
in {
summarize = pkgs.callPackage ./nix/pkgs/summarize.nix {};
}
);
checks = forAllSystems (system: {
summarize = self.packages.${system}.summarize;
});
};
}

3
garnix.yaml Normal file
View File

@ -0,0 +1,3 @@
builds:
include:
- "checks.aarch64-darwin.*"

34
nix/pkgs/summarize.nix Normal file
View File

@ -0,0 +1,34 @@
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation {
pname = "summarize";
version = "0.9.0";
src = fetchurl {
url = "https://github.com/steipete/summarize/releases/download/v0.9.0/summarize-macos-arm64-v0.9.0.tar.gz";
hash = "sha256-B6/eUcbv4K9kgozo1fELFX+NNGa0C64dB6OSydwu6A8=";
};
dontConfigure = true;
dontBuild = true;
unpackPhase = ''
tar -xzf "$src"
'';
installPhase = ''
runHook preInstall
mkdir -p "$out/bin"
cp summarize "$out/bin/summarize"
chmod 0755 "$out/bin/summarize"
runHook postInstall
'';
meta = with lib; {
description = "Link clean text summary";
homepage = "https://github.com/steipete/summarize";
license = licenses.mit;
platforms = [ "aarch64-darwin" ];
mainProgram = "summarize";
};
}

1
result Symbolic link
View File

@ -0,0 +1 @@
/nix/store/j39ry85yas1jgjs5hn7a9mx6v96nx093-summarize-0.9.0

27
tools/summarize/flake.nix Normal file
View File

@ -0,0 +1,27 @@
{
description = "clawdbot plugin: summarize";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
root.url = "path:../..";
};
outputs = { self, nixpkgs, root }:
let
system = "aarch64-darwin";
pkgs = import nixpkgs { inherit system; };
summarize = root.packages.${system}.summarize;
in {
packages.${system}.summarize = summarize;
clawdbotPlugin = {
name = "summarize";
skills = [ ./skills/summarize ];
packages = [ summarize ];
needs = {
stateDirs = [];
requiredEnv = [];
};
};
};
}

View File

@ -0,0 +1,9 @@
---
name: summarize
description: Summarize a URL by extracting clean text.
---
Use the `summarize` CLI to fetch a URL and return a summary.
Example:
- summarize https://example.com/article