Prepare packaged Hermes for native in-app updates
Track main while pinning the initial release commit. Ship the matching upstream installer and Linux namespace sandbox backport, and launch the native user build prepared by Omarchy. Co-Authored-By: GPT-6 Codex (xhigh) <noreply@openai.com>
This commit is contained in:
1 parent
3356e8c04c
commit
9588b28cf6
4 files changed
+206
-32
No files matched your search
@@ -1,25 +1,11 @@
|
||||
# Maintainer: David Heinemeier Hansson <david@hey.com>
|
||||
|
||||
# Nous builds Hermes Desktop for macOS and Windows only -- their download page
|
||||
# offers a .dmg and an .exe and tells Linux users to install from a terminal --
|
||||
# so there is no vendor binary to repackage. Their electron-builder config does
|
||||
# carry a Linux target, though, and it works; this builds it.
|
||||
#
|
||||
# The app only runs against a Hermes runtime built from its own commit, so it
|
||||
# provisions one itself under ~/.hermes on first launch and the package stays
|
||||
# on the newest tag. Pairing it with the mise CLI instead was tried and does
|
||||
# not work: PyPI trails the tags, and the version gap fails the readiness probe
|
||||
# with a 401. Pinning back to the tag behind PyPI's release does not rescue it
|
||||
# either -- v2026.7.20's desktop hangs after "backend is ready" without ever
|
||||
# opening a window, against its own matching runtime.
|
||||
#
|
||||
# The app is only a shell: it runs `hermes serve` against a Hermes CLI it does
|
||||
# not ship, and clones its own copy with the upstream install script when it
|
||||
# finds none. /usr/bin/hermes-desktop heads that off. See hermes-desktop.sh.
|
||||
# Build a prebuilt release; Omarchy seeds it into the user's Hermes checkout
|
||||
# so the upstream updater can rebuild and relaunch it in place.
|
||||
|
||||
pkgname=hermes-desktop
|
||||
pkgver=2026.8.31
|
||||
pkgrel=2
|
||||
pkgrel=3
|
||||
pkgdesc='Native desktop shell for Hermes Agent'
|
||||
arch=('x86_64')
|
||||
url='https://github.com/NousResearch/hermes-agent'
|
||||
@@ -32,7 +18,7 @@ depends=(
|
||||
'dbus'
|
||||
'expat'
|
||||
'curl'
|
||||
'gcc-libs'
|
||||
'gcc'
|
||||
'gdk-pixbuf2'
|
||||
'git'
|
||||
'glib2'
|
||||
@@ -52,19 +38,24 @@ depends=(
|
||||
'libxfixes'
|
||||
'libxkbcommon'
|
||||
'libxrandr'
|
||||
'make'
|
||||
'mesa'
|
||||
'nodejs'
|
||||
'npm'
|
||||
'nspr'
|
||||
'nss'
|
||||
'pango'
|
||||
'python'
|
||||
'systemd-libs'
|
||||
'util-linux'
|
||||
'xdg-utils'
|
||||
)
|
||||
|
||||
optdepends=('omarchy: installs the Hermes CLI the app needs on first launch')
|
||||
optdepends=('omarchy: sets up the user installation for in-app updates')
|
||||
|
||||
# The build runs the repo's own npm workspace install, which fetches Electron
|
||||
# and rebuilds node-pty against it.
|
||||
makedepends=('git' 'imagemagick' 'nodejs' 'npm' 'python')
|
||||
makedepends=('imagemagick')
|
||||
|
||||
# Electron bundles prebuilt binaries that stripping corrupts.
|
||||
options=('!strip' '!debug')
|
||||
@@ -80,17 +71,21 @@ _srcdir="hermes-agent-${pkgver}"
|
||||
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz"
|
||||
'hermes-desktop.sh'
|
||||
'hermes-desktop.desktop'
|
||||
'hermes-desktop.png')
|
||||
'hermes-desktop.png'
|
||||
'runtime.patch'
|
||||
'runtime-test.py')
|
||||
sha256sums=('78fb3ff707ec1d17044b875ecac8bef28aa39d44242824f6871ca40afe7bf217'
|
||||
'f5833b969ce451aadee9f08d92db55cce3c7c9213175080590bf37444854d676'
|
||||
'93540bbd8e3fccd132546c3e8f7da16eb04e67c20bbfe84034a2736c00e6d49d'
|
||||
'3ef685bfcf366776b025d26c37d32854d8d4aa2023b2bd07c8e08b001ef1e8c4'
|
||||
'd60d164e24fdcf6532133b8ea43c77a201e4b9e9dbc396187b58d51d8590ef52')
|
||||
'd60d164e24fdcf6532133b8ea43c77a201e4b9e9dbc396187b58d51d8590ef52'
|
||||
'cd544605f3b6ed397a829244e4f4d08f2d28a3a2f56edff7d3287b55bdf606b2'
|
||||
'99caf1ef09c3ac88892ee674ebe92faa916c225fb938fe6796cf04b4e4ac397f')
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${_srcdir}"
|
||||
|
||||
export GITHUB_SHA="${_commit}"
|
||||
export GITHUB_REF_NAME="v${pkgver}"
|
||||
export GITHUB_REF_NAME="main"
|
||||
|
||||
# The desktop workspace resolves against the repo root, so the install has to
|
||||
# happen there rather than in apps/desktop.
|
||||
@@ -100,6 +95,10 @@ build() {
|
||||
npm run pack
|
||||
}
|
||||
|
||||
check() {
|
||||
python "${srcdir}/runtime-test.py" "${srcdir}/${_srcdir}" "${srcdir}/runtime.patch"
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${_srcdir}/apps/desktop/release/linux-unpacked"
|
||||
|
||||
@@ -108,6 +107,12 @@ package() {
|
||||
|
||||
install -Dm755 "${srcdir}/hermes-desktop.sh" "${pkgdir}/usr/bin/${pkgname}"
|
||||
|
||||
install -Dm644 "${srcdir}/${_srcdir}/scripts/install.sh" \
|
||||
"${pkgdir}/usr/share/${pkgname}/install.sh"
|
||||
# Backport the upstream user-namespace fixes to this release's user runtime.
|
||||
install -Dm644 "${srcdir}/runtime.patch" "${pkgdir}/usr/share/${pkgname}/runtime.patch"
|
||||
|
||||
|
||||
install -Dm644 "${srcdir}/hermes-desktop.desktop" \
|
||||
"${pkgdir}/usr/share/applications/${pkgname}.desktop"
|
||||
|
||||
|
||||
Reference in new issue
Block a user