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>
40 lines
878 B
YAML
40 lines
878 B
YAML
name: nix build
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'go.mod'
|
|
- 'go.sum'
|
|
- 'default.nix'
|
|
- 'flake.nix'
|
|
- 'flake.lock'
|
|
- 'overlay.nix'
|
|
- 'packages.nix'
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'go.mod'
|
|
- 'go.sum'
|
|
- 'default.nix'
|
|
- 'flake.nix'
|
|
- 'flake.lock'
|
|
- 'overlay.nix'
|
|
- 'packages.nix'
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
BD_DISABLE_METRICS: "1"
|
|
BD_DISABLE_EVENT_FLUSH: "1"
|
|
|
|
jobs:
|
|
nix-build:
|
|
name: nix build .#default
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6
|
|
- name: Install Nix
|
|
uses: DeterminateSystems/determinate-nix-action@9adf02b41cfdac2632e1c16f0480ff5bf3b05dd6 # v3
|
|
- name: Build
|
|
run: nix build .#default --print-build-logs
|