Skip to content

chore: Flox toolchain and Nix package for nix-darwin - #17

Merged
mgreau merged 3 commits into
mgreau:mainfrom
imkarrer:chore/flox-toolchain-nix-package
Aug 30, 2026
Merged

chore: Flox toolchain and Nix package for nix-darwin#17
mgreau merged 3 commits into
mgreau:mainfrom
imkarrer:chore/flox-toolchain-nix-package

Conversation

@imkarrer

@imkarrer imkarrer commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Two optional, separate paths — you do not need both.

Develop (Flox). Flox is a per-project environment. flox activate in this repo gives you the Go 1.25.7 toolchain plus git, gh, and make, without installing them globally. Module cache stays in the environment. This does not put zen on your system PATH. If you already have Go 1.25+, ignore Flox and make build.

Install (Nix). Nix is a package manager; a flake in this repo describes how to build zen for Linux and macOS. packages.default is a portable buildGoModule (wrapped git/gh). Put it on PATH however you already manage Nix software:

  • NixOS: environment.systemPackages
  • home-manager: home.packages
  • nix-darwin: environment.systemPackages
  • any Nix: nix profile install github:mgreau/zen

Quick start is still clone / make build / mv zen ~/bin. Nix is an optional alternative to that copy, not a required dependency. zen setup still writes ~/.zen/config.yaml.

The README flake URLs are github:mgreau/zen and are only valid after this merges. Until then, Nix testers must use this fork, e.g. github:imkarrer/zen/chore/flox-toolchain-nix-package (or github:imkarrer/zen once this lands on the fork’s default branch). nix profile install github:mgreau/zen will not see this flake yet.

Test plan

  • No Nix/Flox: make build with Go 1.25+
  • Flox: flox activate && make build && ./zen version
  • Nix (this PR, fork URL): nix build github:imkarrer/zen/chore/flox-toolchain-nix-package./result/bin/zen version
  • Do not use github:mgreau/zen for pre-merge Nix install; that is the post-merge README
  • zen setup still writes ~/.zen/config.yaml

Match go.mod without requiring contributors to install Go, git, gh, and make globally, and keep the module cache inside the environment.
packages.default builds on Linux and macOS. The in-repo Flox env stays a Go toolchain only. Quick start remains clone and make build; Nix is an optional alternative to copying the binary onto PATH.
@mgreau
mgreau self-requested a review August 28, 2026 14:32
Comment thread .flox/pkgs/zen.nix Outdated
flox build was taking catalog buildGoModule unpinned while the flake overrode it. Pin in zen.nix so both paths (and a later flox publish) share the same Go 1.25 builder.
@imkarrer
imkarrer requested a review from mgreau August 28, 2026 17:42
@mgreau
mgreau merged commit b1d184f into mgreau:main Aug 30, 2026
1 check passed
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