Commit graph

4 commits

Author SHA1 Message Date
Harry Miller
63bef27fe8
feat(nix): expose packages as an overlay for downstream override (#3910)
Restructure the nix packaging so downstream consumers can use the
standard `callPackage` `.override` pattern (e.g. swap vendorHash,
buildGoModule, or other inputs) and consume beads with their own
nixpkgs version:

  final: prev: {
    beads-unwrapped = prev.beads-unwrapped.override (prevArgs: {
      buildGoModule = args:
        prevArgs.buildGoModule (args // { vendorHash = "..."; });
    });
  }

Changes:
- Add overlay.nix exposing `beads-unwrapped` (the buildGoModule
  output) and `beads` (the wrapper with shell completions baked in
  plus per-shell completion passthru attrs).
- default.nix: drop the `self` flake-ref input and use `src = ./.;`
  so the package is consumable via the overlay outside the flake
  context.
- flake.nix: expose `overlays.default` and apply the overlay to the
  nixpkgs instance used for `packages` / `devShells`.
- packages.nix: thin wrapper that pulls outputs from the overlayed
  package set.
- nix-build CI: include overlay.nix and packages.nix in the path
  filter so overlay-only changes still trigger builds.

This is a focused overlay-only follow-up to #3422 against current
main (post-#3491). The ICU / version / env-var rearrangements from
the original PR are intentionally omitted because they no longer
apply: ICU is gone (`gms_pure_go`), `proxyVendor = true` is in
place, and the env plumbing has been reshaped upstream.

Co-authored-by: Dylan Johnston <dylan.johnston@cba.com.au>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: matt wilkie <maphew@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 22:39:37 -07:00
coffeegoddd☕️✨
d7d7a34607 : refactor to use RunE, emit usage metrics, skip metrics in CI
(cherry picked from commit 9596c7233d)
2026-06-22 20:44:43 +00:00
matt wilkie
e9ebb2bc4d Fix Nix CI Go toolchain selection (bd-7mh.6) 2026-04-28 07:00:35 -07:00
beads/crew/collins
7f41edd9c4 feat(nix): modernize flake for nixpkgs-25.11, fix-merge PR #2314
Switch from nixpkgs-unstable to nixpkgs-25.11 which has Go 1.25.6.
Drop flake-utils in favor of inline forAllSystems helper (modern convention).
Refactor default.nix to follow callPackage conventions (explicit deps).
Extract packages.nix for cleaner separation.

Adjustments from original PR:
- Removed unnecessary icu/pkg-config deps (no CGO/ICU usage in beads)
- Removed commented-out dead overlay code
- Preserved shell completion sub-packages (fish/bash/zsh)

Closes #2314

Co-Authored-By: Nick Zadrozny <nz@omc.io>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 17:24:10 -08:00