* Beads / dolt requires ICU libraries and headers for https://github.com/dolthub/go-icu-regex - added * Refactor nix slightly for ergonomics. * Remove unnecessary overlay
49 lines
1.3 KiB
Nix
49 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
self,
|
|
buildGoModule,
|
|
git,
|
|
icu,
|
|
...
|
|
}:
|
|
buildGoModule {
|
|
pname = "beads";
|
|
version = "1.0.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-7eb7u47f4/OCnK/T56Zd6b5XUyV6vkBmissryBxANBU=";
|
|
|
|
# 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//')"
|
|
go mod edit -go="$goVer"
|
|
|
|
env
|
|
'';
|
|
|
|
# Allow patch-level toolchain upgrades when a dependency's minimum Go patch
|
|
# version is newer than nixpkgs' bundled patch version.
|
|
env.GOTOOLCHAIN = "auto";
|
|
# Due to https://github.com/dolthub/go-icu-regex, which requires
|
|
# separate install of icu headers and library.
|
|
env.CGO_CPPFLAGS="-I${icu.dev}/include";
|
|
env.CGO_LDFLAGS="-L${icu}/lib";
|
|
|
|
# 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/gastownhall/beads";
|
|
license = licenses.mit;
|
|
mainProgram = "bd";
|
|
maintainers = [ ];
|
|
};
|
|
}
|