{ lib, buildGoModule, fetchFromGitHub }:

buildGoModule rec {
  pname = "perles";
  version = "unstable-2025-01-09";

  src = fetchFromGitHub {
    owner = "zjrosen";
    repo = "perles";
    rev = "main";
    hash = "sha256-JgRayb4+mJ1r0AtdnQfqAw2+QRte+licsfZOaRgYqcs=";
  };

  vendorHash = "sha256-R7UWTdBuPteneRqxrWK51nqLtZwDsqQoMAcohN4fyak=";

  # Tests require a real git repository context
  doCheck = false;

  meta = with lib; {
    description = "A TUI for the Beads issue tracking system with BQL query language";
    homepage = "https://github.com/zjrosen/perles";
    license = licenses.mit;
    maintainers = [ ];
    mainProgram = "perles";
  };
}
