Merge pull request #453 from scottjones/contrib/ghostty-aarch64

Build stable Ghostty and its split packages for aarch64
This commit is contained in:
Ryan Hughes authored and GitHub committed 2026-09-15 12:29:03 -07:00
commit b27f3fe62e
2 files changed
+123

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
{
"source": "local",
"upstream": {
"watch": {
"pattern": "v(?P<version>[0-9]+(?:\\.[0-9]+)*)",
"git_tags": "https://github.com/ghostty-org/ghostty.git"
}
}
}
+114
View File
@@ -0,0 +1,114 @@
# Ghostty for aarch64, built from the upstream release source tarball.
#
# Ghostty 1.3.x requires Zig 0.15.2 exactly. Arch Linux ARM currently ships
# newer Zig releases, so use the verified upstream aarch64 toolchain only at
# package-build time rather than publishing a second Zig package.
pkgbase=ghostty
pkgname=(ghostty ghostty-shell-integration ghostty-terminfo ghostty-nautilus)
pkgver=1.3.1
pkgrel=1
pkgdesc='Fast, native, feature-rich terminal emulator pushing modern features'
arch=(aarch64)
url='https://github.com/ghostty-org/ghostty'
license=(MIT)
depends=(
bzip2
fontconfig
freetype2
glib2
glibc
gtk4
gtk4-layer-shell
harfbuzz
libadwaita
libpng
oniguruma
pixman
wayland
zlib
)
makedepends=(
blueprint-compiler
curl
gettext
pkgconf
)
_zigver=0.15.2
_archive="$pkgbase-$pkgver"
source=(
"https://release.files.ghostty.org/$pkgver/$_archive.tar.gz"
"https://ziglang.org/download/$_zigver/zig-aarch64-linux-$_zigver.tar.xz"
)
sha256sums=(
'3349d25600ffbda281197a18314f7d18791969cffe9474f0ff16a45a9ebfccdb'
'958ed7d1e00d0ea76590d27666efbf7a932281b3d7ba0c6b01b0ff26498f667f'
)
prepare() {
cd "$_archive"
PATH="$srcdir/zig-aarch64-linux-$_zigver:$PATH" \
ZIG_GLOBAL_CACHE_DIR="$srcdir/zig-global-cache" \
./nix/build-support/fetch-zig-cache.sh
}
build() {
cd "$_archive"
# A '-' suffix is a SemVer prerelease and selects Ghostty's tip channel.
# Keep the package revision as build metadata on the stable release.
PATH="$srcdir/zig-aarch64-linux-$_zigver:$PATH" \
DESTDIR=build \
zig build \
--prefix /usr \
--system "$srcdir/zig-global-cache/p" \
-Doptimize=ReleaseFast \
-Dgtk-x11=true \
-Dcpu=baseline \
-Dpie=true \
-Demit-docs=false \
-Dversion-string="$pkgver+omarchy.$pkgrel" \
--build-id=sha1
}
package_ghostty() {
depends+=(ghostty-shell-integration ghostty-terminfo)
optdepends=('ghostty-nautilus: Open in Ghostty context menu in GNOME Files')
cd "$_archive"
cp -a build/* "$pkgdir/"
install -Dm0644 LICENSE "$pkgdir/usr/share/licenses/ghostty/LICENSE"
rm -r "$pkgdir/usr/share/terminfo" \
"$pkgdir/usr/share/ghostty/shell-integration" \
"$pkgdir/usr/share/nautilus-python"
}
package_ghostty-shell-integration() {
pkgdesc='Shell integration scripts for Ghostty'
depends=()
cd "$_archive"
install -d "$pkgdir/usr/share/ghostty/shell-integration"
cp -a build/usr/share/ghostty/shell-integration/. \
"$pkgdir/usr/share/ghostty/shell-integration/"
install -Dm0644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
package_ghostty-terminfo() {
pkgdesc='Terminfo for Ghostty'
depends=()
cd "$_archive"
install -d "$pkgdir/usr/share/terminfo"
cp -a build/usr/share/terminfo/x "$pkgdir/usr/share/terminfo/"
install -Dm0644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
package_ghostty-nautilus() {
pkgdesc='Open in Ghostty for GNOME Files'
depends=(ghostty nautilus-python)
license=(GPL-2.0-or-later)
cd "$_archive"
install -d "$pkgdir/usr/share/nautilus-python"
cp -a build/usr/share/nautilus-python/. "$pkgdir/usr/share/nautilus-python/"
}