feat: Add Nix flake for declarative builds
Add flake.nix with computed vendorHash for Go dependencies. The flake supports all major platforms (x86_64/aarch64 Linux and macOS) and builds the bd binary from cmd/bd. Removed unnecessary postInstall section as buildGoModule already names the binary correctly from subPackages. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> perf: Use self input instead of ./. for faster Nix evaluation Replace src = ./. with src = self in flake.nix to reduce unnecessary file copying during evaluation. This eliminates the Nix warning about evaluation performance.
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
{
|
||||
description = "beads (bd) - An issue tracker designed for AI-supervised coding workflows";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachSystem [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
"x86_64-darwin"
|
||||
"aarch64-darwin"
|
||||
] (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
packages.default = pkgs.buildGoModule {
|
||||
pname = "beads";
|
||||
version = "0.9.5";
|
||||
|
||||
src = self;
|
||||
|
||||
# Point to the main Go package
|
||||
subPackages = [ "cmd/bd" ];
|
||||
|
||||
# Go module dependencies hash (computed via nix build)
|
||||
vendorHash = "sha256-WvwT48izxMxx9qQmZp/6zwv7hHgTVd9KmOJFm7RWvrI=";
|
||||
|
||||
meta = with pkgs.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 = [ ];
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user