nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 69 lines 1.6 kB view raw
1{ 2 lib, 3 stdenv, 4 buildGoModule, 5 fetchFromGitHub, 6 gitMinimal, 7 installShellFiles, 8 versionCheckHook, 9 writableTmpDirAsHomeHook, 10}: 11 12buildGoModule (finalAttrs: { 13 pname = "beads"; 14 version = "0.42.0"; 15 16 src = fetchFromGitHub { 17 owner = "steveyegge"; 18 repo = "beads"; 19 tag = "v${finalAttrs.version}"; 20 hash = "sha256-3t+pm7vuFj3PH1oCJ/AnwbGupqleimNQnP2bRSBHrSg="; 21 }; 22 23 vendorHash = "sha256-ovG0EWQFtifHF5leEQTFvTjGvc+yiAjpAaqaV0OklgE="; 24 25 subPackages = [ "cmd/bd" ]; 26 27 ldflags = [ 28 "-s" 29 "-w" 30 ]; 31 32 nativeBuildInputs = [ installShellFiles ]; 33 34 nativeCheckInputs = [ 35 gitMinimal 36 writableTmpDirAsHomeHook 37 ]; 38 39 # Skip security tests on Darwin - they check for /etc/passwd which isn't available in sandbox 40 checkFlags = lib.optionals stdenv.hostPlatform.isDarwin [ 41 "-skip=TestCleanupMergeArtifacts_CommandInjectionPrevention" 42 ]; 43 44 preCheck = '' 45 export PATH="$out/bin:$PATH" 46 ''; 47 48 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' 49 installShellCompletion --cmd bd \ 50 --bash <($out/bin/bd completion bash) \ 51 --fish <($out/bin/bd completion fish) \ 52 --zsh <($out/bin/bd completion zsh) 53 ''; 54 55 nativeInstallCheckInputs = [ 56 versionCheckHook 57 writableTmpDirAsHomeHook 58 ]; 59 versionCheckProgramArg = "version"; 60 doInstallCheck = true; 61 62 meta = { 63 description = "Lightweight memory system for AI coding agents with graph-based issue tracking"; 64 homepage = "https://github.com/steveyegge/beads"; 65 license = lib.licenses.mit; 66 maintainers = with lib.maintainers; [ kedry ]; 67 mainProgram = "bd"; 68 }; 69})