Unverified Commit c974b5e2 authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

picoclaw: init at 0.2.0 (#492249)

parents 4e751f23 6a59f2c1
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -16248,6 +16248,12 @@
    githubId = 115060;
    name = "Marek Maksimczyk";
  };
  manfredmacx = {
    email = "mfmacx@proton.me";
    github = "manfredmacx";
    githubId = 222261305;
    name = "Manfred Macx";
  };
  Mange = {
    name = "Magnus Bergmark";
    email = "me@mange.dev";
+57 −0
Original line number Diff line number Diff line
{
  lib,
  buildGoModule,
  fetchFromGitHub,
  versionCheckHook,
}:

buildGoModule (finalAttrs: {
  pname = "picoclaw";
  version = "0.2.0";

  src = fetchFromGitHub {
    owner = "sipeed";
    repo = "picoclaw";
    tag = "v${finalAttrs.version}";
    hash = "sha256-zCeURNN152yL3Qi1UFDvSB85xflbLAMzQUTwGThALss=";
  };

  proxyVendor = true;
  vendorHash = "sha256-CsTGC5Ajo9RV6rJPQgnFqA+bQ2TEafI4tt3iXpVwaeY=";

  preBuild = ''
    go generate ./...
  '';

  ldflags = [
    "-s"
    "-w"
    "-X github.com/sipeed/picoclaw/cmd/picoclaw/internal.version=${finalAttrs.version}"
  ];

  doInstallCheck = true;
  nativeInstallCheckInputs = [ versionCheckHook ];
  versionCheckProgramArg = "version";

  checkFlags =
    let
      skippedTests = [
        "TestGetVersion"
        "TestCodexCliProvider_MockCLI_Success"
        "TestCodexCliProvider_MockCLI_Error"
        "TestCodexCliProvider_MockCLI_WithModel"
      ];
    in
    [ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];

  meta = {
    description = "Tiny, Fast, and Deployable anywhere - automate the mundane, unleash your creativity";
    homepage = "https://github.com/sipeed/picoclaw";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [
      manfredmacx
      drupol
    ];
    mainProgram = "picoclaw";
  };
})