Add an apps.default output to the Nix flake that enables running bd directly with 'nix run .' without needing to use the full package path. The apps output references the built bd binary from packages.default, allowing users to easily run the tool with: nix run . -- <command> Tested with 'nix run . -- version' which correctly executes bd. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
48 lines
1.3 KiB
Nix
48 lines
1.3 KiB
Nix
{
|
|
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 = [ ];
|
|
};
|
|
};
|
|
|
|
apps.default = {
|
|
type = "app";
|
|
program = "${self.packages.${system}.default}/bin/bd";
|
|
};
|
|
}
|
|
);
|
|
}
|