Skip to content

feat: add Nix flake packaging and prepare README for open-source#39

Merged
kylecarbs merged 2 commits into
mainfrom
nix-flake-oss
Jun 11, 2026
Merged

feat: add Nix flake packaging and prepare README for open-source#39
kylecarbs merged 2 commits into
mainfrom
nix-flake-oss

Conversation

@kylecarbs

Copy link
Copy Markdown
Member

Packages boo as a Nix flake and restructures the README for open-sourcing, following the structure of the coder/coder and coder/code-server READMEs.

Changes

  • flake.nix / flake.lock: installable package (nix run github:coder/boo, nix profile add github:coder/boo), a dev shell with Zig 0.15.2, and nixfmt-tree as the formatter. The version is parsed from build.zig.zon so there is one source of truth.
  • README: centered header with tagline, quick links, and badges (CI, release, license, Discord); split Install into install-script and Nix sections; documented nix develop / nix build; added Support and Contributing sections.
  • CI: new nix job running nix flake check, nix build, and a nix run . -- version smoke test.
  • .gitignore: ignore Nix result symlinks.
Implementation notes
  • Nix builds are sandboxed without network access, so all Zig dependencies pinned in build.zig.zon (libghostty and its transitive deps) are pre-fetched with zig build --fetch=all into a fixed-output derivation, mirroring what CI does. Instructions for updating outputHash when deps change are in a comment in flake.nix.
  • The dependency cache is copied into ZIG_GLOBAL_CACHE_DIR, not symlinked: ghostty's uucode table generator runs helper executables with a working directory inside the package cache and locates outputs via relative ../ paths, which resolve physically into /nix/store through a symlink and fail with FileNotFound.
  • The package builds with zig.hook defaults (--release=safe -Dcpu=baseline), matching the ReleaseSafe mode of published release binaries, and runs zig build test (unit tests) in the check phase. PTY integration tests remain in the existing CI jobs.
  • nixpkgs-unstable is pinned because it ships Zig 0.15.2 exactly, satisfying minimum_zig_version.
Verification

On x86_64-linux:

  • nix flake check passes.
  • nix build succeeds; check phase runs unit tests.
  • ./result/bin/boo version prints boo 0.5.12.
  • Full automation loop against the Nix-built binary: new -d, send --text --enter, wait --idle, peek (output observed), kill.
  • nix run . -- version works.
  • nix fmt is a no-op (flake already formatted).

This PR was generated by Coder Agents on behalf of @kylecarbs.

@kylecarbs kylecarbs merged commit 968fbc1 into main Jun 11, 2026
5 checks passed
@kylecarbs kylecarbs deleted the nix-flake-oss branch June 11, 2026 18:52
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.

1 participant