beads/default.nix
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

42 lines
1.1 KiB
Nix

{
lib,
self,
buildGoModule,
git,
...
}:
buildGoModule {
pname = "beads";
version = "0.58.0";
src = self;
# Point to the main Go package
subPackages = [ "cmd/bd" ];
doCheck = false;
# Go module dependencies hash - if build fails with hash mismatch, update with the "got:" value
vendorHash = "sha256-OL6QGf4xSMpEbmU+41pFdO0Rrs3H162T3pdiW9UfWR0=";
# Relax go.mod version for Nix: nixpkgs Go may lag behind the latest
# patch release, and GOTOOLCHAIN=auto can't download in the Nix sandbox.
postPatch = ''
goVer="$(go env GOVERSION | sed 's/^go//')"
sed -i "s/^go .*/go $goVer/" go.mod
'';
# Allow patch-level toolchain upgrades when a dependency's minimum Go patch
# version is newer than nixpkgs' bundled patch version.
env.GOTOOLCHAIN = "auto";
# Git is required for tests
nativeBuildInputs = [ git ];
meta = with lib; {
description = "beads (bd) - An issue tracker designed for AI-supervised coding workflows";
homepage = "https://github.com/steveyegge/beads";
license = licenses.mit;
mainProgram = "bd";
maintainers = [ ];
};
}