Skip to content

docs: install mcpp with Nix from mcpp-community/nix-mcpp - #818

Merged
Sunrisepeak merged 1 commit into
mcpp-community:mainfrom
lihaoze123:feat/nix-flake
Oct 18, 2026
Merged

Sunrisepeak merged 1 commit into
mcpp-community:mainfrom
lihaoze123:feat/nix-flake

Conversation

@lihaoze123

@lihaoze123 lihaoze123 commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds "Option 5 — Nix (flake)" to README / README.zh-CN, pointing to
mcpp-community/nix-mcpp. The
AI-assistant option becomes 6.

Per review, the flake and its automation live in their own repository, the way
homebrew-mcpp does. This PR
no longer adds a flake, a workflow, or a CI change to this repository: the
earlier version's flake.nix, tools/nix/, nix-publish.yml and the
classify_changes.py change are all dropped.

nix-mcpp packages the prebuilt release tarballs. release.json there is the
release's mcpp-release.json, copied verbatim. A daily bump.yml, with
repository_dispatch (mcpp-release) and workflow_dispatch as well, builds
and runs the new release before it commits to nix-mcpp's own main.

Criteria

Criterion Where it ran
check_docs_style.sh, check_docs_structure.sh pass local
nix-mcpp: nix flake check (all systems evaluate; x86_64-linux builds, install check mcpp --version = 2026.10.17.1) nix-mcpp CI on mcpp-community, run 39123620929; bump there ran too (39123617508: already current)
nix-mcpp scripts/update.sh: upgrades 2026.10.16.3 → 2026.10.17.1, refuses a downgrade (exit 3), skips a release without its manifest local

Intersections

New rule or feature Invariant it crosses Test at the crossing
none — README only — —

Compatibility

None; documentation only.

mcpp-community/nix-mcpp exists (transferred from lihaoze123/nix-mcpp), so
the links resolve.

Checks before merging

  • bash .github/tools/check_docs_style.sh, check_docs_structure.sh and check_version_pins.sh pass.
  • python3 .github/tools/check_workflow_assertions.py passes (no workflow changed).
  • No commit on the branch carries an attribution trailer.
  • The squash merge is given an explicit subject and body.

@Sunrisepeak

Copy link
Copy Markdown
Member

aur是会自动更新到 aur的仓库, 不会打乱mcpp主仓库的commit记录, 可以参考 brew

创建一个独立的 nix-mcpp 仓库来维护 这个 nix 的 自动public 不会干扰 主仓库, 你可以创建一个 nix-mcpp 仓库, 然后 转移到 mcpp-community 下面, 然后日常你来维护 (一般应该做了好也不需要太动)

@lihaoze123 lihaoze123 changed the title feat: add a Nix flake that packages the release binaries docs: install mcpp with Nix from mcpp-community/nix-mcpp Oct 18, 2026
@lihaoze123

Copy link
Copy Markdown
Contributor Author

谢谢建议,已经按 homebrew-mcpp 的方式改好了:

  • 新建了独立仓库 https://github.com/lihaoze123/nix-mcpp 。flake、自动更新和 CI 都放在里面,CI 已经跑通。
    • 自动更新(bump.yml)和 homebrew-mcpp 一样有三个入口:每天定时、repository_dispatch(mcpp-release)、手动触发。
    • 每次更新会把新 release 的 mcpp-release.json 原样复制成 release.json,先实际构建并运行 mcpp --version,通过后才 commit 到 nix-mcpp 自己的 main。
    • release 还没发完(manifest 还没上传)时会跳过,不会降级。
  • 这个 PR 现在只改 README / README.zh-CN,在安装方式里加一节 Nix,指向 mcpp-community/nix-mcpp。之前加到主仓库的 flake、workflow 和 CI 分类器改动都已撤掉。

关于转移:GitHub 要求转移者在目标组织有创建仓库的权限,我目前不是 mcpp-community 的成员。可以把我加进组织(或者给建仓库的权限),我再发起转移;也可以由你们那边处理,看哪种方便。转移完成后这个 PR 里的链接才会生效,所以建议转移之后再合并。之后 nix-mcpp 由我来日常维护。

@Sunrisepeak

Copy link
Copy Markdown
Member

@lihaoze123 下面创建issue 会自动发组织邀请链接, 如果还不能转, 然后把我加一下 仓库权限 我来转移

@lihaoze123

Copy link
Copy Markdown
Contributor Author

仓库已经转到 https://github.com/mcpp-community/nix-mcpp ,谢谢。

转移后在新位置手动触发了一遍:ci 通过(run),bump 也能在组织下正常运行,判断已是最新版 2026.10.17.1 后退出(run)。这个 PR 里的链接现在都能打开,可以 review 合并了。

还有两个可选项,不影响合并:

  • 我目前对 nix-mcpp 是 Write 权限,看不到 Actions 设置。如果方便,可以给我 Admin(或 Maintain),这样以后排查定时任务会方便一些。
  • 如果希望发版后立刻更新 Nix,而不是等每天的定时任务,可以在 homebrew-publish.yml 里再向 mcpp-community/nix-mcpp 发一个同样的 mcpp-release dispatch(token 需要覆盖 nix-mcpp)。不加也没关系,最多晚 24 小时。

@Sunrisepeak

Copy link
Copy Markdown
Member

仓库已经转到 https://github.com/mcpp-community/nix-mcpp ,谢谢。

转移后在新位置手动触发了一遍:ci 通过(run),bump 也能在组织下正常运行,判断已是最新版 2026.10.17.1 后退出(run)。这个 PR 里的链接现在都能打开,可以 review 合并了。

还有两个可选项,不影响合并:

  • 我目前对 nix-mcpp 是 Write 权限,看不到 Actions 设置。如果方便,可以给我 Admin(或 Maintain),这样以后排查定时任务会方便一些。
  • 如果希望发版后立刻更新 Nix,而不是等每天的定时任务,可以在 homebrew-publish.yml 里再向 mcpp-community/nix-mcpp 发一个同样的 mcpp-release dispatch(token 需要覆盖 nix-mcpp)。不加也没关系,最多晚 24 小时。

权限已经添加, 后面我更新一下 publish

@Sunrisepeak
Sunrisepeak merged commit 0406fda into mcpp-community:main Oct 18, 2026
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.

2 participants