Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/ghostty.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ does not try to replace it. Remove it with `omarchy-pkg-remove ghostty` after se
There is no automatic upstream Ghostty release check: a newer pinned release
requires an updated Try Omarchy installer and another installation.

The package leaves `/usr/share/terminfo/g/ghostty` owned by `ncurses` and
includes Ghostty's `xterm-ghostty` entry. Revision `1.3.1-2` fixes the file
conflict that prevented `1.3.1-1` from installing. If you encountered that
failure, run the updated installer from a checkout as described below.

## Existing VMs

Existing VM disks do not automatically receive a rebuilt factory image. From a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ echo 'The first build takes several minutes and uses temporary disk space.'
# Installing dependencies and publishing the completed package require sudo;
# download, signature verification, compilation and makepkg run unprivileged.
omarchy-pkg-add gtk4 libadwaita gtk4-layer-shell libx11 libxkbcommon mesa \
glibc gcc-libs pkgconf gettext minisign fakeroot binutils || fail 'could not install build dependencies'
glibc gcc-libs ncurses pkgconf gettext minisign fakeroot binutils || fail 'could not install build dependencies'
for tool in makepkg python3 curl tar zstd minisign pkg-config fakeroot bsdtar repo-add pacman; do
command -v "$tool" >/dev/null || fail "$tool is required"
done
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# User-initiated build, not part of the factory package transaction.
pkgname=ghostty
pkgver=1.3.1
pkgrel=1
pkgrel=2
pkgdesc='Ghostty terminal with a Try Omarchy VirGL rendering fallback'
arch=('aarch64')
url='https://ghostty.org'
license=('MIT')
depends=('gtk4' 'libadwaita' 'gtk4-layer-shell' 'libx11' 'libxkbcommon' 'mesa' 'glibc' 'gcc-libs')
depends=('gtk4' 'libadwaita' 'gtk4-layer-shell' 'libx11' 'libxkbcommon' 'mesa' 'glibc' 'gcc-libs' 'ncurses')
makedepends=('pkgconf' 'gettext' 'minisign')
options=('!debug' '!strip' '!lto')
source=(
Expand Down Expand Up @@ -38,6 +38,8 @@ build() {

package() {
cp -a "$srcdir/staged/usr" "$pkgdir/"
# ncurses owns this alias. Keep Ghostty's xterm-ghostty entry for TERM.
rm -f "$pkgdir/usr/share/terminfo/g/ghostty"
install -dm755 "$pkgdir/usr/lib/ghostty"
mv "$pkgdir/usr/bin/ghostty" "$pkgdir/usr/lib/ghostty/ghostty"
install -m755 "$srcdir/ghostty-wrapper" "$pkgdir/usr/bin/ghostty"
Expand Down
4 changes: 2 additions & 2 deletions guest/spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,15 @@
},
"ghostty": {
"version": "1.3.1",
"pkgrel": "1",
"pkgrel": "2",
"sourceUrl": "https://release.files.ghostty.org/1.3.1/ghostty-1.3.1.tar.gz",
"sourceSha256": "3349d25600ffbda281197a18314f7d18791969cffe9474f0ff16a45a9ebfccdb",
"signingKey": "RWQlAjJC23149WL2sEpT/l0QKy7hMIFhYdQOFy0Z7z7PbneUgvlsnYcV",
"zigVersion": "0.15.2",
"zigUrl": "https://ziglang.org/download/0.15.2/zig-aarch64-linux-0.15.2.tar.xz",
"zigSha256": "958ed7d1e00d0ea76590d27666efbf7a932281b3d7ba0c6b01b0ff26498f667f",
"recipe": "native-overlay/usr/local/share/try-omarchy/ghostty/PKGBUILD",
"recipeSha256": "fe333bdccba74a4817d2b8e7180f4f37f8455bbb9019cb7db81481c3f64bbf9c",
"recipeSha256": "039101852ca314042c7a28892554418ca7f067a174c4dea3bdc453182bbde28c",
"wrapperSha256": "c41b20e46f257da7a06ee8c67b1056d099f61d7935ac2014525b1b2b1f74f827",
"license": "MIT",
"signatureSha256": "5591816f6a52f03d1ea5be0129fcc396aeece7238419cdd36e511546ee242798"
Expand Down
42 changes: 42 additions & 0 deletions guest/tests/test_ghostty_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,48 @@ def test_signature_failure_stops_before_build(self):
self.assertEqual(result.returncode, 42)
self.assertNotIn('continued', result.stdout)

def test_package_preserves_terminfo_without_claiming_ncurses_alias(self):
with tempfile.TemporaryDirectory() as temporary:
root = Path(temporary)
src = root / 'src'
pkg = root / 'pkg'
pkg.mkdir()
staged = src / 'staged/usr'
files = {
'bin/ghostty': b'compiled executable',
'share/terminfo/x/xterm-ghostty': b'compiled terminfo',
'share/ghostty/terminfo/ghostty.terminfo': b'terminfo source',
'share/applications/com.mitchellh.ghostty.desktop': b'desktop entry',
}
for name, contents in files.items():
path = staged / name
path.parent.mkdir(parents=True, exist_ok=True)
path.write_bytes(contents)
alias = staged / 'share/terminfo/g/ghostty'
alias.parent.mkdir(parents=True)
os.link(staged / 'share/terminfo/x/xterm-ghostty', alias)
version = SPEC['supplyChain']['ghostty']['version']
license = src / f'ghostty-{version}/LICENSE'
license.parent.mkdir()
license.write_text('MIT')
shutil.copyfile(ASSETS / 'ghostty-wrapper', src / 'ghostty-wrapper')
# GNU install -D creates this parent in the Linux guest; precreate
# it so the package function can also run with macOS BSD install.
(pkg / 'usr/share/licenses/ghostty').mkdir(parents=True)
result = subprocess.run(
['bash', '-c', 'set -e; source "$1"; srcdir=$2; pkgdir=$3; package; printf "%s\\n" "${depends[@]}"',
'bash', str(ASSETS / 'PKGBUILD'), str(src), str(pkg)],
capture_output=True, text=True)
self.assertEqual(result.returncode, 0, result.stderr)
self.assertIn('ncurses', result.stdout.splitlines())
self.assertFalse((pkg / 'usr/share/terminfo/g/ghostty').exists())
self.assertEqual(alias.read_bytes(), b'compiled terminfo')
for name, contents in files.items():
target = 'lib/ghostty/ghostty' if name == 'bin/ghostty' else name
self.assertEqual((pkg / 'usr' / target).read_bytes(), contents)
self.assertEqual((pkg / 'usr/bin/ghostty').read_bytes(), (ASSETS / 'ghostty-wrapper').read_bytes())
self.assertEqual((pkg / 'usr/share/licenses/ghostty/LICENSE').read_text(), 'MIT')

def test_wrapper_scopes_rendering_and_preserves_arguments(self):
for cmdline, expected in (('quiet omarchy.qemu_virgl=1 root=/dev/vda', '1'),
('omarchy.qemu_virgl=10', '0'), ('xomarchy.qemu_virgl=1', '0'), ('', '0')):
Expand Down
4 changes: 2 additions & 2 deletions macos/run-qemu-gpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -754,15 +754,15 @@ ghostty = exact_keys(
)
if ghostty != {
"version": "1.3.1",
"pkgrel": "1",
"pkgrel": "2",
"sourceUrl": "https://release.files.ghostty.org/1.3.1/ghostty-1.3.1.tar.gz",
"sourceSha256": "3349d25600ffbda281197a18314f7d18791969cffe9474f0ff16a45a9ebfccdb",
"signingKey": "RWQlAjJC23149WL2sEpT/l0QKy7hMIFhYdQOFy0Z7z7PbneUgvlsnYcV",
"zigVersion": "0.15.2",
"zigUrl": "https://ziglang.org/download/0.15.2/zig-aarch64-linux-0.15.2.tar.xz",
"zigSha256": "958ed7d1e00d0ea76590d27666efbf7a932281b3d7ba0c6b01b0ff26498f667f",
"recipe": "native-overlay/usr/local/share/try-omarchy/ghostty/PKGBUILD",
"recipeSha256": "fe333bdccba74a4817d2b8e7180f4f37f8455bbb9019cb7db81481c3f64bbf9c",
"recipeSha256": "039101852ca314042c7a28892554418ca7f067a174c4dea3bdc453182bbde28c",
"wrapperSha256": "c41b20e46f257da7a06ee8c67b1056d099f61d7935ac2014525b1b2b1f74f827",
"license": "MIT",
"signatureSha256": "5591816f6a52f03d1ea5be0129fcc396aeece7238419cdd36e511546ee242798"
Expand Down
Loading