From 6a59f2c189c2004a9cfc980ffbac0b1569e88d79 Mon Sep 17 00:00:00 2001 From: Manfred Macx Date: Tue, 3 Mar 2026 21:27:39 +0100 Subject: [PATCH] picoclaw: init at 0.2.0 --- pkgs/by-name/pi/picoclaw/package.nix | 57 ++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 pkgs/by-name/pi/picoclaw/package.nix diff --git a/pkgs/by-name/pi/picoclaw/package.nix b/pkgs/by-name/pi/picoclaw/package.nix new file mode 100644 index 000000000000..e67e36479e08 --- /dev/null +++ b/pkgs/by-name/pi/picoclaw/package.nix @@ -0,0 +1,57 @@ +{ + 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"; + }; +})