Expose host-native CLI binary as the default flake package#126
Conversation
The default package was the full release bundle: the CLI cross-compiled for all seven platforms, laid out under bin/<os>_<arch>/crossplane. This made nix build and nix run unhelpful for anyone consuming the CLI from another flake. nix run couldn't find a binary to run, and producing one binary meant a from-source build of all seven, six of which you'd throw away. This change makes default the host-native binary, built for the system Nix is running on, so nix build and nix run give you a single binary for your own machine. The multi-platform bundle moves to a new package named release. The per-platform builder already existed to assemble the bundle, so default just wraps it for the host, deriving GOOS and GOARCH from stdenv.hostPlatform. The CI build-artifacts job now builds .#release explicitly so it still produces and uploads the full bundle. The push-artifacts app already referenced the release derivation directly, so the S3 push and promote flows are unaffected. Fixes crossplane#125. Signed-off-by: Nic Cope <nicc@rk0n.org>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
ChangesFlake default/release split and CI update
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes 🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description of your changes
Fixes #125
The
defaultpackage was the full release bundle: the CLI cross-compiled for all seven platforms, laid out underbin/<os>_<arch>/crossplane. This madenix buildandnix rununhelpful for anyone consuming the CLI from another flake.nix runcouldn't find a binary to run, and producing one binary meant a from-source build of all seven, six of which you'd throw away.This PR makes
defaultthe host-native binary, built for the system Nix is running on, sonix buildandnix rungive you a single binary for your own machine. The multi-platform bundle moves to a new package namedrelease.The per-platform builder already existed to assemble the bundle, so
defaultjust wraps it for the host, derivingGOOSandGOARCHfromstdenv.hostPlatform. The CIbuild-artifactsjob now builds.#releaseexplicitly so it still produces and uploads the full bundle. Thepush-artifactsapp already referenced thereleasederivation directly, so the S3 push and promote flows are unaffected.I have:
./nix.sh flake checkto ensure this PR is ready for review.Added or updated unit tests.Linked a PR or a docs tracking issue to document this change.Addedbackport release-x.ylabels to auto-backport this PR.Need help with this checklist? See the cheat sheet.