Unverified Commit 8e0c7393 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

beads: 0.42.0 -> 1.0.0 (#498876)

parents d4bc66d8 eb8c520d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -11401,6 +11401,11 @@
    githubId = 39416660;
    name = "Mladen Branković";
  };
  imcvampire = {
    github = "imcvampire";
    githubId = 9426721;
    name = "Quoc-Anh Nguyen";
  };
  imgabe = {
    email = "gabrielpmonte@hotmail.com";
    github = "ImGabe";
+41 −12
Original line number Diff line number Diff line
@@ -2,25 +2,28 @@
  lib,
  stdenv,
  buildGoModule,
  dolt,
  fetchFromGitHub,
  gitMinimal,
  icu,
  installShellFiles,
  makeBinaryWrapper,
  versionCheckHook,
  writableTmpDirAsHomeHook,
}:

buildGoModule (finalAttrs: {
  pname = "beads";
  version = "0.42.0";
  version = "1.0.0";

  src = fetchFromGitHub {
    owner = "steveyegge";
    owner = "gastownhall";
    repo = "beads";
    tag = "v${finalAttrs.version}";
    hash = "sha256-3t+pm7vuFj3PH1oCJ/AnwbGupqleimNQnP2bRSBHrSg=";
    hash = "sha256-D2jShGpkOWKx9aRmRvV5bmV8t0/Y2eAE8q0m54QrRN0=";
  };

  vendorHash = "sha256-ovG0EWQFtifHF5leEQTFvTjGvc+yiAjpAaqaV0OklgE=";
  vendorHash = "sha256-7DJgqJX2HDa9gcGD8fLNHLIXvGAEivYeDYx3snCUyCE=";

  subPackages = [ "cmd/bd" ];

@@ -29,23 +32,46 @@ buildGoModule (finalAttrs: {
    "-w"
  ];

  nativeBuildInputs = [ installShellFiles ];
  buildInputs = [
    icu
  ];

  nativeBuildInputs = [
    installShellFiles
    makeBinaryWrapper
  ];

  nativeCheckInputs = [
    gitMinimal
    writableTmpDirAsHomeHook
  ];

  # Skip security tests on Darwin - they check for /etc/passwd which isn't available in sandbox
  checkFlags = lib.optionals stdenv.hostPlatform.isDarwin [
    "-skip=TestCleanupMergeArtifacts_CommandInjectionPrevention"
  # Workaround for: panic: httptest: failed to listen on a port: listen tcp6 [::1]:0: bind: operation not permitted
  # ref: https://github.com/NixOS/nix/pull/1646
  __darwinAllowLocalNetworking = true;

  checkFlags =
    let
      skippedTests = [
        # Upstream test bug: version gap 0.55.0->1.0.0 triggers "very old" warning instead of expected "ok"
        "TestCheckMetadataVersionTracking"
      ]
      ++ lib.optionals stdenv.hostPlatform.isDarwin [
        # Checks for /etc/passwd which isn't available in sandbox
        "TestCleanupMergeArtifacts_CommandInjectionPrevention"
      ];
    in
    [ "-skip=^(${lib.concatStringsSep "|" skippedTests})$" ];

  preCheck = ''
    export PATH="$out/bin:$PATH"
  '';

  postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
  postInstall = ''
    wrapProgram $out/bin/bd \
      --prefix PATH : ${lib.makeBinPath [ dolt ]}
  ''
  + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
    installShellCompletion --cmd bd \
      --bash <($out/bin/bd completion bash) \
      --fish <($out/bin/bd completion fish) \
@@ -61,9 +87,12 @@ buildGoModule (finalAttrs: {

  meta = {
    description = "Lightweight memory system for AI coding agents with graph-based issue tracking";
    homepage = "https://github.com/steveyegge/beads";
    homepage = "https://github.com/gastownhall/beads";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ kedry ];
    maintainers = with lib.maintainers; [
      kedry
      imcvampire
    ];
    mainProgram = "bd";
  };
})