From feabd26fa2f53259ce6a7e6dcc6b9d84f482e77c Mon Sep 17 00:00:00 2001 From: David Birks Date: Wed, 16 Apr 2025 00:54:45 -0400 Subject: [PATCH] Initial add of goose-desktop --- .SRCINFO | 18 +++++++++++++++ .gitignore | 4 ++++ PKGBUILD | 54 +++++++++++++++++++++++++++++++++++++++++++ goose-desktop.desktop | 10 ++++++++ goose-desktop.sh | 3 +++ 5 files changed, 89 insertions(+) create mode 100644 .SRCINFO create mode 100644 .gitignore create mode 100644 PKGBUILD create mode 100644 goose-desktop.desktop create mode 100644 goose-desktop.sh diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..438cc3aeae29 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = goose-desktop + pkgdesc = An open-source, extensible AI agent that goes beyond code suggestions (with UI) + pkgver = 1.0.18 + pkgrel = 1 + url = https://github.com/block/goose + arch = x86_64 + license = Apache-2.0 + makedepends = cargo + makedepends = libxcb + makedepends = just + conflicts = codename-goose + conflicts = codename-goose-bin + options = !lto + options = !debug + source = https://github.com/block/goose/archive/refs/tags/v1.0.18.tar.gz + b2sums = c1f0e98dc30232aee7e61be0ba483bca35daef6073358358343aa2ffda780829509c884c4b64aefc9ca4d6d06e00ab431ff3fc387daa6a22c99abc1238c099f7 + +pkgname = goose-desktop diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..9acdf966c1a9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +pkg +src +*.tar.gz +*.pkg.tar.zst diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..f0ca1475c776 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,54 @@ +# Maintainer: David Birks + +pkgname=goose-desktop +pkgver=1.0.18 +pkgrel=1 +pkgdesc="An open-source, extensible AI agent that goes beyond code suggestions (with UI)" +arch=("x86_64") +url="https://github.com/block/goose" +license=("Apache-2.0") +depends=() +optdepends=() +makedepends=( + "cargo" + "libxcb" + "just" +) +# LTO is broken for dependency ring https://github.com/briansmith/ring/issues/1444 +options=("!lto" "!debug") +source=("https://github.com/block/goose/archive/refs/tags/v${pkgver}.tar.gz") +b2sums=("c1f0e98dc30232aee7e61be0ba483bca35daef6073358358343aa2ffda780829509c884c4b64aefc9ca4d6d06e00ab431ff3fc387daa6a22c99abc1238c099f7") +conflicts=( + "codename-goose" + "codename-goose-bin" +) + +build() { + cd goose-$pkgver + + # Build the command-line binary + just release-binary + + cd ui/desktop + # Install dependencies, ignoring the prepare script which tries to run husky + npm ci --ignore-scripts + + # Build the Electron app + npx electron-forge package +} + +package() { + cd goose-$pkgver + + # Install command-line binary + install -Dm755 "target/release/goose" "$pkgdir/usr/bin/goose" + + # Install the Electron app + mkdir -p "$pkgdir/usr/lib/$pkgname" + cp -r "ui/desktop/out/Goose-linux-x64/"* "$pkgdir/usr/lib/$pkgname/" + + # Install wrapper script, desktop file, and icons + install -Dm755 "$startdir/goose-desktop.sh" "$pkgdir/usr/bin/$pkgname" + install -Dm644 ui/desktop/out/Goose-linux-x64/resources/images/icon.png "$pkgdir/usr/share/pixmaps/$pkgname.png" + install -Dm644 "$startdir/goose-desktop.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop" +} diff --git a/goose-desktop.desktop b/goose-desktop.desktop new file mode 100644 index 000000000000..4b4452f29eb7 --- /dev/null +++ b/goose-desktop.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Application +Name=Goose +Comment=An open-source, extensible AI agent that goes beyond code suggestions +Exec=/usr/bin/goose-desktop +Icon=goose-desktop +Terminal=false +Categories=Development;Utility; +Keywords=AI;Code;Assistant; +StartupWMClass=Goose diff --git a/goose-desktop.sh b/goose-desktop.sh new file mode 100644 index 000000000000..1fa6c05a63a5 --- /dev/null +++ b/goose-desktop.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +exec /usr/lib/goose-desktop/Goose "$@"