Skip to content

Commit a588170

Browse files
Arthur-Ficialclaude
andcommitted
fix(nixpkgs): rename apfel-ai -> apfel-llm everywhere (#137)
Upstream NixOS/nixpkgs landed the package as apfel-llm via PR #508084 (merged 2026-04-22), not apfel-ai. Our auto-bump workflow was opening PRs against pkgs/by-name/ap/apfel-ai/package.nix - a path that no longer exists - so every release since 1.0.5 has had its nixpkgs bump quietly fail. A community contributor (arunoruto) has been bumping versions manually upstream. Renames apfel-ai -> apfel-llm across: - .github/workflows/bump-nixpkgs.yml (workflow name, file path, branch name, commit message, PR title) - scripts/bump-nixpkgs.sh (comment header) - Tests/integration/test_nixpkgs_bump.py (pname fixture) - docs/install.md (Option 2 nix install: now shipped, not pending) - docs/nixpkgs.md (every reference + rewritten "Why" section noting upstream chose -llm over our original -ai proposal) - docs/release.md (distribution channels table) - docs/routines.md (one prose mention) - .claude/routines/04-dist-channel-watch.md (channel-sync routine) - CLAUDE.md (distribution list + nixpkgs channel description) - README.md (Nix added to install.md pointer) Closes #137. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 4a83555 commit a588170

10 files changed

Lines changed: 45 additions & 45 deletions

File tree

.claude/routines/04-dist-channel-watch.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Check whether apfel's three distribution channels are in sync. If any channel is
2222
|---|---|
2323
| **GitHub Releases** (the upstream that the other two feed from) | `gh release view --repo Arthur-Ficial/apfel` latest tag, published-at |
2424
| **homebrew-core** (`brew install apfel`) | `curl -s https://raw.githubusercontent.com/Homebrew/homebrew-core/master/Formula/a/apfel.rb` - look for the `version` / `url` fields |
25-
| **nixpkgs** (`nix profile install nixpkgs#apfel-ai`) | `curl -s https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/by-name/ap/apfel-ai/package.nix` - look for the `version` field |
25+
| **nixpkgs** (`nix profile install nixpkgs#apfel-llm`) | `curl -s https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/by-name/ap/apfel-llm/package.nix` - look for the `version` field |
2626

2727
### Step-by-step
2828

@@ -40,7 +40,7 @@ Check whether apfel's three distribution channels are in sync. If any channel is
4040

4141
4. **Fetch the nixpkgs package** and parse its version:
4242
```bash
43-
curl -sf https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/by-name/ap/apfel-ai/package.nix | grep -E 'version|hash'
43+
curl -sf https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/by-name/ap/apfel-llm/package.nix | grep -E 'version|hash'
4444
```
4545

4646
5. **Compute lag.** For each channel that is behind the latest GitHub Release:
@@ -68,7 +68,7 @@ Routine check this morning - looks like <channel(s)> are trailing the latest rel
6868
|---|---|---|---|
6969
| GitHub Releases | v<canonical> | - | - |
7070
| homebrew-core | v<hb-current> | v<canonical> | ~<N>h |
71-
| nixpkgs `apfel-ai` | <nix-current> | <canonical> | ~<N>h |
71+
| nixpkgs `apfel-llm` | <nix-current> | <canonical> | ~<N>h |
7272
7373
## Fixing it (for you, not me)
7474
@@ -91,7 +91,7 @@ gh workflow run bump-nixpkgs.yml --repo Arthur-Ficial/apfel -f version=<canonica
9191
Or from a local nixpkgs checkout:
9292
9393
\```bash
94-
./scripts/bump-nixpkgs.sh --version <canonical> --file pkgs/by-name/ap/apfel-ai/package.nix
94+
./scripts/bump-nixpkgs.sh --version <canonical> --file pkgs/by-name/ap/apfel-llm/package.nix
9595
\```
9696
9797
## What I did NOT do

.github/workflows/bump-nixpkgs.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
name: Bump nixpkgs apfel-ai
1+
name: Bump nixpkgs apfel-llm
22

33
# Fires when `make release` publishes a new GitHub Release. The workflow
44
# forks/pulls NixOS/nixpkgs, runs scripts/bump-nixpkgs.sh to update
5-
# version + hash in pkgs/by-name/ap/apfel-ai/package.nix, and opens a
5+
# version + hash in pkgs/by-name/ap/apfel-llm/package.nix, and opens a
66
# bump PR against nixpkgs master.
77
#
88
# This is our Layer 2 fallback -- the community r-ryantm bot usually
@@ -78,9 +78,9 @@ jobs:
7878
run: |
7979
bash ./scripts/bump-nixpkgs.sh \
8080
--version "$VERSION" \
81-
--file "nixpkgs/pkgs/by-name/ap/apfel-ai/package.nix"
81+
--file "nixpkgs/pkgs/by-name/ap/apfel-llm/package.nix"
8282
# If git status shows no change, we're idempotent - bail early.
83-
if git -C nixpkgs diff --quiet -- pkgs/by-name/ap/apfel-ai/package.nix; then
83+
if git -C nixpkgs diff --quiet -- pkgs/by-name/ap/apfel-llm/package.nix; then
8484
echo "changed=0" >> "$GITHUB_OUTPUT"
8585
else
8686
echo "changed=1" >> "$GITHUB_OUTPUT"
@@ -96,10 +96,10 @@ jobs:
9696
run: |
9797
git config user.name "Arthur Ficial"
9898
git config user.email "arti.ficial@fullstackoptimization.com"
99-
branch="apfel-ai-$VERSION"
99+
branch="apfel-llm-$VERSION"
100100
git checkout -b "$branch"
101-
git add pkgs/by-name/ap/apfel-ai/package.nix
102-
git commit -m "apfel-ai: $VERSION"
101+
git add pkgs/by-name/ap/apfel-llm/package.nix
102+
git commit -m "apfel-llm: $VERSION"
103103
git push --force origin "$branch"
104104
echo "branch=$branch" >> "$GITHUB_OUTPUT"
105105
@@ -137,6 +137,6 @@ jobs:
137137
gh pr create --repo NixOS/nixpkgs \
138138
--head "Arthur-Ficial:$BRANCH" \
139139
--base master \
140-
--title "apfel-ai: $VERSION" \
140+
--title "apfel-llm: $VERSION" \
141141
--body "$body"
142142
fi

CLAUDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ HTTP Server (/v1/*) ───────┘ ContextManager → Transcript API
8686

8787
- Version: `1.0.0` (source of truth: `.version`)
8888
- Tests: 366 unit + 220 integration
89-
- Distribution: homebrew-core (`brew install apfel`), nixpkgs (`nix profile install nixpkgs#apfel-ai`), and the Arthur-Ficial/homebrew-tap
89+
- Distribution: homebrew-core (`brew install apfel`), nixpkgs (`nix profile install nixpkgs#apfel-llm`), and the Arthur-Ficial/homebrew-tap
9090
- Stability policy: [STABILITY.md](STABILITY.md)
9191
- Security policy: [SECURITY.md](SECURITY.md)
9292

@@ -328,7 +328,7 @@ apfel ships through three channels. All pull the same signed tarball from each G
328328

329329
- **homebrew-core** - `brew install apfel`. Autobump detects new releases; latency ~24h. We do not maintain the formula.
330330
- **Arthur-Ficial/homebrew-tap** - `brew install Arthur-Ficial/tap/apfel`. Synchronous, pushed as part of `make release`. Secondary channel; also houses apfel-family tools (apfel-chat, apfel-clip, apfel-mcp, etc.).
331-
- **nixpkgs** - `nix profile install nixpkgs#apfel-ai`. Name is `apfel-ai` because nixpkgs already has an unrelated physics `apfel`. Two-layer automation: community r-ryantm bot (~weekly) plus our `.github/workflows/bump-nixpkgs.yml` on every release (~5 min). See [docs/nixpkgs.md](docs/nixpkgs.md). Requires the `NIXPKGS_BUMP_PAT` repo secret.
331+
- **nixpkgs** - `nix profile install nixpkgs#apfel-llm`. Name is `apfel-llm` because nixpkgs already has an unrelated physics `apfel` package and the disambiguator landed upstream as `apfel-llm` (PR NixOS/nixpkgs#508084). Two-layer automation: community r-ryantm bot (~weekly) plus our `.github/workflows/bump-nixpkgs.yml` on every release (~5 min). See [docs/nixpkgs.md](docs/nixpkgs.md). Requires the `NIXPKGS_BUMP_PAT` repo secret.
332332
- Emergency Homebrew bump: `brew bump-formula-pr apfel --url=<tarball-url> --sha256=<hash>`
333333
- Emergency nixpkgs bump: run `scripts/bump-nixpkgs.sh` against a local nixpkgs clone and open a PR manually.
334334

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Build from source (Command Line Tools with macOS 26.4 SDK / Swift 6.3, no Xcode)
4444
git clone https://github.com/Arthur-Ficial/apfel.git && cd apfel && make install
4545
```
4646

47-
Same-day tap, Mint, mise, troubleshooting: [docs/install.md](docs/install.md).
47+
Nix, same-day tap, Mint, mise, troubleshooting: [docs/install.md](docs/install.md).
4848

4949
## Quick Start
5050

Tests/integration/test_nixpkgs_bump.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
}}:
2929
3030
stdenvNoCC.mkDerivation (finalAttrs: {{
31-
pname = "apfel-ai";
31+
pname = "apfel-llm";
3232
version = "{version}";
3333
3434
src = fetchurl {{

docs/install.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,13 @@ brew install Arthur-Ficial/tap/apfel
2222

2323
No build tools needed. See [brew-install.md](brew-install.md) for troubleshooting.
2424

25-
## Option 2: Nix (nixpkgs) - pending
26-
27-
The initial nixpkgs submission ([NixOS/nixpkgs#510089](https://github.com/NixOS/nixpkgs/pull/510089)) is under upstream review and not yet merged. Once it lands:
25+
## Option 2: Nix (nixpkgs)
2826

2927
```bash
30-
nix profile install nixpkgs#apfel-ai
28+
nix profile install nixpkgs#apfel-llm
3129
```
3230

33-
Attribute name is `apfel-ai` because nixpkgs already has an unrelated `apfel` package (a particle-physics PDF library); the binary on `$PATH` is still `apfel`. See [docs/nixpkgs.md](nixpkgs.md) for automation details and tracking issue [#88](https://github.com/Arthur-Ficial/apfel/issues/88) for current status.
31+
Attribute name is `apfel-llm` because nixpkgs already has an unrelated `apfel` package (a particle-physics PDF library); the binary on `$PATH` is still `apfel`. The package landed via [NixOS/nixpkgs#508084](https://github.com/NixOS/nixpkgs/pull/508084). See [docs/nixpkgs.md](nixpkgs.md) for automation details.
3432

3533
## Option 3: Build from source
3634

docs/nixpkgs.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
# nixpkgs distribution
22

3-
apfel ships on [nixpkgs](https://github.com/NixOS/nixpkgs) under the attribute `apfel-ai`. This page explains the name choice, how the automation works, and how to test or repair the package locally.
3+
apfel ships on [nixpkgs](https://github.com/NixOS/nixpkgs) under the attribute `apfel-llm`. This page explains the name choice, how the automation works, and how to test or repair the package locally.
44

55
## Install (end users)
66

77
```bash
8-
nix profile install nixpkgs#apfel-ai
8+
nix profile install nixpkgs#apfel-llm
99
```
1010

1111
Runtime requirements are the same as Homebrew: macOS 26 Tahoe or later, Apple Silicon, Apple Intelligence enabled, Siri language matching device language.
1212

13-
The binary on your `$PATH` is still `apfel` - only the install-time attribute is `apfel-ai`.
13+
The binary on your `$PATH` is still `apfel` - only the install-time attribute is `apfel-llm`.
1414

15-
## Why `apfel-ai` and not `apfel`
15+
## Why `apfel-llm` and not `apfel`
1616

17-
nixpkgs already has an unrelated package at [`pkgs/by-name/ap/apfel`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/ap/apfel/package.nix): the [scarrazza/apfel](https://github.com/scarrazza/apfel) particle-physics PDF Evolution Library (GPL3, maintained by `veprbl`). The name was taken years before apfel-ai existed, so nixpkgs convention requires disambiguation.
17+
nixpkgs already has an unrelated package at [`pkgs/by-name/ap/apfel`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/ap/apfel/package.nix): the [scarrazza/apfel](https://github.com/scarrazza/apfel) particle-physics PDF Evolution Library (GPL3, maintained by `veprbl`). The name was taken years before apfel existed in its AI form, so nixpkgs convention requires disambiguation.
18+
19+
The disambiguator that landed upstream is `apfel-llm` (via [NixOS/nixpkgs#508084](https://github.com/NixOS/nixpkgs/pull/508084)). An earlier proposal used `apfel-ai`, but the upstream maintainer chose `-llm` as the more descriptive suffix. The binary on `$PATH` is still `apfel` either way - only the install attribute differs.
1820

1921
## Why a pre-built binary derivation
2022

@@ -39,8 +41,8 @@ Expected latency: within ~7 days of release.
3941
[`.github/workflows/bump-nixpkgs.yml`](../.github/workflows/bump-nixpkgs.yml) fires on every `release: published` event from `make release`. It:
4042

4143
1. Checks out a fresh copy of `Arthur-Ficial/nixpkgs` (our fork, synced with upstream master).
42-
2. Runs [`scripts/bump-nixpkgs.sh`](../scripts/bump-nixpkgs.sh) to rewrite `version` and `hash` in `pkgs/by-name/ap/apfel-ai/package.nix`.
43-
3. Commits on a branch `apfel-ai-<version>`, force-pushes to the fork.
44+
2. Runs [`scripts/bump-nixpkgs.sh`](../scripts/bump-nixpkgs.sh) to rewrite `version` and `hash` in `pkgs/by-name/ap/apfel-llm/package.nix`.
45+
3. Commits on a branch `apfel-llm-<version>`, force-pushes to the fork.
4446
4. Opens a PR on `NixOS/nixpkgs` (or updates the existing one if already open).
4547

4648
Expected latency: within ~5 minutes of release.
@@ -83,19 +85,19 @@ On any Mac with Nix installed (we use the Determinate Systems installer on Apple
8385
```bash
8486
git clone --depth 1 https://github.com/NixOS/nixpkgs.git /tmp/nixpkgs-test
8587
cd /tmp/nixpkgs-test
86-
nix-build -A apfel-ai --no-out-link
88+
nix-build -A apfel-llm --no-out-link
8789

8890
# The resulting binary:
89-
ls /nix/store/*-apfel-ai-*/bin/apfel
91+
ls /nix/store/*-apfel-llm-*/bin/apfel
9092
```
9193

92-
Run it: `/nix/store/...-apfel-ai-.../bin/apfel --version`.
94+
Run it: `/nix/store/...-apfel-llm-.../bin/apfel --version`.
9395

9496
To test a version bump before pushing, point `--file` at your local checkout:
9597

9698
```bash
9799
./scripts/bump-nixpkgs.sh --version 1.2.3 \
98-
--file /tmp/nixpkgs-test/pkgs/by-name/ap/apfel-ai/package.nix \
100+
--file /tmp/nixpkgs-test/pkgs/by-name/ap/apfel-llm/package.nix \
99101
--dry-run
100102
```
101103

@@ -105,21 +107,21 @@ Very rare, but: if r-ryantm is down and the workflow is broken, you can bump by
105107

106108
```bash
107109
cd /tmp/nixpkgs-test
108-
git fetch origin master && git checkout -B apfel-ai-manual origin/master
110+
git fetch origin master && git checkout -B apfel-llm-manual origin/master
109111

110112
/path/to/apfel/scripts/bump-nixpkgs.sh \
111113
--version 1.2.3 \
112-
--file pkgs/by-name/ap/apfel-ai/package.nix
114+
--file pkgs/by-name/ap/apfel-llm/package.nix
113115

114-
git add pkgs/by-name/ap/apfel-ai/package.nix
115-
git commit -m "apfel-ai: 1.2.3"
116-
git push fork apfel-ai-manual # where `fork` is Arthur-Ficial/nixpkgs
117-
gh pr create --repo NixOS/nixpkgs --head Arthur-Ficial:apfel-ai-manual --base master \
118-
--title "apfel-ai: 1.2.3"
116+
git add pkgs/by-name/ap/apfel-llm/package.nix
117+
git commit -m "apfel-llm: 1.2.3"
118+
git push fork apfel-llm-manual # where `fork` is Arthur-Ficial/nixpkgs
119+
gh pr create --repo NixOS/nixpkgs --head Arthur-Ficial:apfel-llm-manual --base master \
120+
--title "apfel-llm: 1.2.3"
119121
```
120122

121123
## Tracking
122124

123-
- Package source: <https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/ap/apfel-ai/package.nix>
124-
- nixpkgs PRs: <https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+apfel-ai>
125-
- r-ryantm PRs for apfel-ai: <https://github.com/NixOS/nixpkgs/pulls/r-ryantm?q=apfel-ai>
125+
- Package source: <https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/ap/apfel-llm/package.nix>
126+
- nixpkgs PRs: <https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+apfel-llm>
127+
- r-ryantm PRs for apfel-llm: <https://github.com/NixOS/nixpkgs/pulls/r-ryantm?q=apfel-llm>

docs/release.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Each release is published through three channels. All three pull the same signed
116116
|---------|-----------|-----------|
117117
| [homebrew-core](https://github.com/Homebrew/homebrew-core/blob/master/Formula/a/apfel.rb) (`brew install apfel`) | Up to ~24h after release | Homebrew `autobump-PR` bot detects new GitHub Releases and opens a formula-bump PR. |
118118
| [Arthur-Ficial/homebrew-tap](https://github.com/Arthur-Ficial/homebrew-tap) (`brew install Arthur-Ficial/tap/apfel`) | Synchronous with release | `scripts/publish-release.sh` pushes the new formula directly as part of `make release`. |
119-
| [nixpkgs](https://github.com/NixOS/nixpkgs/tree/master/pkgs/by-name/ap/apfel-ai) (`nix profile install nixpkgs#apfel-ai`) | Within ~5 min of release (Layer 2), or ~weekly (Layer 1) | Two layers: community [`r-ryantm`](https://github.com/ryantm/nixpkgs-update) bot (primary, ~weekly), plus our own [`bump-nixpkgs.yml`](.github/workflows/bump-nixpkgs.yml) workflow that opens a PR on every `release: published` event (fallback, minutes). See [nixpkgs.md](nixpkgs.md). |
119+
| [nixpkgs](https://github.com/NixOS/nixpkgs/tree/master/pkgs/by-name/ap/apfel-llm) (`nix profile install nixpkgs#apfel-llm`) | Within ~5 min of release (Layer 2), or ~weekly (Layer 1) | Two layers: community [`r-ryantm`](https://github.com/ryantm/nixpkgs-update) bot (primary, ~weekly), plus our own [`bump-nixpkgs.yml`](.github/workflows/bump-nixpkgs.yml) workflow that opens a PR on every `release: published` event (fallback, minutes). See [nixpkgs.md](nixpkgs.md). |
120120

121121
All three channels are "owned" in the sense that we file PRs against them and respond to reviewer feedback - but merges into homebrew-core and nixpkgs are gated by their respective maintainer communities. The tap is the only channel where we merge directly.
122122

docs/routines.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Routines run on Anthropic's Linux cloud runners, so they cannot:
2020
- Run `make test`, `make preflight`, `swift build`, or any integration test that needs Apple Intelligence (there is no Apple Intelligence on Linux)
2121
- Test the actual behavior of code changes - only static review (style, structure, test coverage, security audit)
2222
- Merge a PR, approve a PR, cut a release, or update any distribution channel (Homebrew, nixpkgs, tap)
23-
- Change what you install via `brew install apfel` or `nix profile install nixpkgs#apfel-ai`
23+
- Change what you install via `brew install apfel` or `nix profile install nixpkgs#apfel-llm`
2424

2525
Every code-PR review from a routine contains an explicit note that functional correctness was **not** verified and that @franzenzenhofer needs to run tests locally before merging.
2626

scripts/bump-nixpkgs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
#
3-
# bump-nixpkgs.sh - update apfel-ai/package.nix version and hash.
3+
# bump-nixpkgs.sh - update apfel-llm/package.nix version and hash.
44
#
55
# Does NOT touch git or gh; callers (GitHub Actions workflow, humans)
66
# drive commit/push/PR separately. This keeps the script deterministic

0 commit comments

Comments
 (0)