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>
72 lines
1.4 KiB
Nix
72 lines
1.4 KiB
Nix
{
|
|
description = "beads (bd) - An issue tracker designed for AI-supervised coding workflows";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
|
};
|
|
|
|
outputs =
|
|
{
|
|
self,
|
|
nixpkgs,
|
|
...
|
|
}:
|
|
let
|
|
systems = [
|
|
"aarch64-darwin"
|
|
"aarch64-linux"
|
|
"x86_64-darwin"
|
|
"x86_64-linux"
|
|
];
|
|
|
|
overlay = import ./overlay.nix self;
|
|
|
|
forAllSystems =
|
|
f:
|
|
nixpkgs.lib.genAttrs systems (
|
|
system:
|
|
f (
|
|
import nixpkgs {
|
|
inherit system;
|
|
overlays = [ overlay ];
|
|
}
|
|
)
|
|
);
|
|
in
|
|
{
|
|
overlays.default = overlay;
|
|
|
|
packages = forAllSystems (import ./packages.nix);
|
|
|
|
apps = nixpkgs.lib.genAttrs systems (
|
|
system:
|
|
rec {
|
|
bd = {
|
|
type = "app";
|
|
program = "${self.packages.${system}.default}/bin/bd";
|
|
};
|
|
default = bd;
|
|
}
|
|
);
|
|
|
|
devShells = forAllSystems (
|
|
pkgs:
|
|
{
|
|
default = pkgs.mkShell {
|
|
buildInputs = with pkgs; [
|
|
go_1_26
|
|
git
|
|
gopls
|
|
gotools
|
|
golangci-lint
|
|
sqlite
|
|
];
|
|
shellHook = ''
|
|
echo "beads development shell"
|
|
echo "Go version: $(go version)"
|
|
'';
|
|
};
|
|
}
|
|
);
|
|
};
|
|
}
|