feat: add Nix flake packaging and prepare README for open-source#39
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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, andnixfmt-treeas the formatter. The version is parsed frombuild.zig.zonso there is one source of truth.nix develop/nix build; added Support and Contributing sections.nixjob runningnix flake check,nix build, and anix run . -- versionsmoke test..gitignore: ignore Nixresultsymlinks.Implementation notes
build.zig.zon(libghostty and its transitive deps) are pre-fetched withzig build --fetch=allinto a fixed-output derivation, mirroring what CI does. Instructions for updatingoutputHashwhen deps change are in a comment inflake.nix.ZIG_GLOBAL_CACHE_DIR, not symlinked: ghostty'suucodetable generator runs helper executables with a working directory inside the package cache and locates outputs via relative../paths, which resolve physically into/nix/storethrough a symlink and fail withFileNotFound.zig.hookdefaults (--release=safe -Dcpu=baseline), matching the ReleaseSafe mode of published release binaries, and runszig build test(unit tests) in the check phase. PTY integration tests remain in the existing CI jobs.nixpkgs-unstableis pinned because it ships Zig 0.15.2 exactly, satisfyingminimum_zig_version.Verification
On x86_64-linux:
nix flake checkpasses.nix buildsucceeds; check phase runs unit tests../result/bin/boo versionprintsboo 0.5.12.new -d,send --text --enter,wait --idle,peek(output observed),kill.nix run . -- versionworks.nix fmtis a no-op (flake already formatted).This PR was generated by Coder Agents on behalf of @kylecarbs.