diff --git a/flake.nix b/flake.nix index 71517ec..c1ed5f1 100644 --- a/flake.nix +++ b/flake.nix @@ -251,6 +251,7 @@ morris = prev.callPackage packages/morris.nix { }; cro = prev.callPackage packages/cro.nix { }; exodus = prev.callPackage packages/exodus.nix { }; + picoclaw = prev.callPackage packages/picoclaw.nix { }; dmenu = prev.writers.writeDashBin "dmenu" ''exec ${final.rofi}/bin/rofi -dmenu "$@"''; weechatScripts = prev.weechatScripts // { hotlist2extern = prev.callPackage packages/weechatScripts/hotlist2extern.nix { }; # TODO upstream @@ -597,6 +598,7 @@ notemenu obsidian-vim opustags + picoclaw pls polyglot q diff --git a/packages/picoclaw.nix b/packages/picoclaw.nix new file mode 100644 index 0000000..ea4e38b --- /dev/null +++ b/packages/picoclaw.nix @@ -0,0 +1,34 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule (finalAttrs: { + pname = "picoclaw"; + version = "0.1.1"; + + src = fetchFromGitHub { + owner = "sipeed"; + repo = "picoclaw"; + rev = "v${finalAttrs.version}"; + hash = "sha256-nx/D8ir4/l0pTnMNORby2FNtU+ouKT0DUjP2vpJLmPk="; + }; + postPatch = '' + substituteInPlace go.mod --replace "go 1.25.7" "go 1.25.5" + ''; + proxyVendor = true; + + # Set to lib.fakeHash or empty initially, then update with the actual hash Nix reports. + vendorHash = "sha256-XKwYmbMyf4yg/E4Yv0uMS9v0oAuMZJwvoaAPCL/1AAY="; + + subPackages = [ "cmd/picoclaw" ]; + + ldflags = [ + "-s" "-w" + "-X main.version=${finalAttrs.version}" + ]; + + meta = with lib; { + description = "Ultra-efficient AI Assistant in Go for $10 hardware"; + homepage = "https://github.com/sipeed/picoclaw"; + license = licenses.mit; # Verify license in the repo + maintainers = []; + }; +})