# ghostty ships some submodules that wrap around existing libraries to provide a nicer experience within zig # those submodules rely on headers provided by vendored versions of their respective library # they will never be compiled or included in the final binary with the exception of glslang,and spirv-cross # # Zig only dependencies are vendored all other dependencies will be resolved from the system # in future releases. %global utfcpp_version 4.0.5 %global iterm2_color_commit 10f216f54a32cee6f1f2e3aa01812650a209c16b %global z2d_commit 1bf4bc81819385f4b24596445c9a7cf3b3592b08 %global spirv_cross_commit 476f384eb7d9e48613c45179e502a15ab95b6b49 %global libvaxis_commit 1f41c121e8fc153d9ce8c6eb64b2bbab68ad7d23 %global glslang_version 14.2.0 %global highway_commit 66486a10623fa0d72fe91260f96c892e41aceb06 %global libxev_commit 3df9337a9e84450a58a2c4af434ec1a036f7b494 %global imgui_commit e391fe2e66eb1c96b1624ae8444dc64c23146ef4 %global wuffs_version 0.4.0-alpha.9 %global ziglyph_commit b89d43d1e3fb01b6074bc1f7fc980324b04d26a5 %global zf_commit 7aacbe6d155d64d15937ca95ca6c014905eb531f %global ghostty_gobject_version 0.14.0-2025-03-18-21-1 # for improved wayland support %global zig_wayland_commit f3c5d503e540ada8cbcb056420de240af0c094f7 %global wayland_commit 9cb3d7aa9dc995ffafdbdef7ab86a949d0fb0e7d %global wayland_protocols_commit 258d8f88f2c8c25a830c6316f87d23ce1a0f12d9 %global plasma_protocols_commit db525e8f9da548cffa2ac77618dd0fbe7f511b86 # libvaxis dependencies %global zigimg_commit 31268548fe3276c0e95f318a6c0d2ab10565b58d %global zg_commit 4a002763419a34d61dcbb1f415821b83b9bf8ddc %global ghostty_commit 57cd5ef08520800533596f00a60ce84b9bd8950d # needed to get rid of a header informing the user the application is compiled in debug mode %global _zig_release_mode fast %global build_options %{shrink: \ -fno-sys=glslang \ -fsys=simdutf \ -Dflatpak=false \ -Dfont-backend=fontconfig_freetype \ -Drenderer=opengl \ -Dgtk-wayland=true \ -Dgtk-x11=true \ -Dpie=true \ -Dversion-string="%{version}" \ -Dstrip=false \ -Dsentry=false \ -Demit-docs=true \ -Demit-terminfo=false \ -Demit-termcap=false \ } %global gtk_options %{shrink: \ %{build_options} \ -Dapp-runtime=gtk \ } %global lib_options %{shrink: \ %{build_options} \ -Dapp-runtime=none \ } # Signing key from https://github.com/ghostty-org/ghostty/blob/main/PACKAGING.md %global public_key RWQlAjJC23149WL2sEpT/l0QKy7hMIFhYdQOFy0Z7z7PbneUgvlsnYcV # libghostty is considered unstable so don't ship it yet # BUG: zig fails to assign a build-id to shared objects # https://github.com/ziglang/zig/pull/22357 %bcond lib 0 Name: ghostty Version: 1.1.2 Release: 5%{?dist} Summary: Fast, native, feature-rich terminal emulator pushing modern features # ghostty: MIT # libvaxis: MIT # libxev: MIT # z2d: MPL-2.0 # zf: MIT # zigimg: MIT # ziglyph: MIT # zg: MIT # zig-wayland: MIT # wayland: MIT # wayland-protocols: MIT # plasma-wayland-protocols LGPL-2.1-only # iTerm2-Color-Schemes: MIT # pkg/utfcpp: BSL-1.0 # pkg/spirv-cross: Apache-2.0 # pkg/glslang: BSD-2-Clause AND BSD-3-Clause AND GPL-3.0-or-later AND Apache-2.0 # pkg/highway: Apache-2.0 # pkg/cimgui: MIT # pkg/wuffs: Apache-2.0 AND MIT # vendor/glad (WTFPL OR CC0-1.0) AND Apache-2.0 # zig-gobject: 0BSD License: MIT AND MPL-2.0 AND LGPL-2.1-only AND BSL-1.0 AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND GPL-3.0-or-later AND Apache-2.0 AND (WTFPL OR CC0-1.0) AND 0BSD URL: https://ghostty.org/ Source0: https://github.com/ghostty-org/ghostty/archive/%{ghostty_commit}/ghostty-%{ghostty_commit}.tar.gz #Source1: https://release.files.ghostty.org/%{version}/ghostty-%{version}.tar.gz.minisig Source10: https://github.com/nemtrif/utfcpp/archive/refs/tags/v%{utfcpp_version}/utfcpp-%{utfcpp_version}.tar.gz Source11: https://github.com/mbadolato/iTerm2-Color-Schemes/archive/%{iterm2_color_commit}/iTerm2-Color-Schemes-%{iterm2_color_commit}.tar.gz Source12: https://github.com/vancluever/z2d/archive/%{z2d_commit}/z2d-%{z2d_commit}.tar.gz Source13: https://github.com/KhronosGroup/SPIRV-Cross/archive/%{spirv_cross_commit}/SPIRV-Cross-%{spirv_cross_commit}.tar.gz Source14: https://github.com/rockorager/libvaxis/archive/%{libvaxis_commit}/libvaxis-%{libvaxis_commit}.tar.gz Source15: https://github.com/KhronosGroup/glslang/archive/refs/tags/%{glslang_version}/glslang-%{glslang_version}.tar.gz Source16: https://github.com/google/highway/archive/%{highway_commit}/highway-%{highway_commit}.tar.gz Source17: https://github.com/mitchellh/libxev/archive/%{libxev_commit}/libxev-%{libxev_commit}.tar.gz Source18: https://github.com/ocornut/imgui/archive/%{imgui_commit}/imgui-%{imgui_commit}.tar.gz Source19: https://github.com/google/wuffs/archive/refs/tags/v%{wuffs_version}/wuffs-%{wuffs_version}.tar.gz Source20: https://deps.files.ghostty.org/ziglyph-%{ziglyph_commit}.tar.gz Source21: https://github.com/natecraddock/zf/archive/%{zf_commit}/zf-%{zf_commit}.tar.gz Source22: https://github.com/zigimg/zigimg/archive/%{zigimg_commit}/zigimg-%{zigimg_commit}.tar.gz Source23: https://codeberg.org/atman/zg/archive/%{zg_commit}.tar.gz#/zg-%{zg_commit}.tar.gz Source24: https://codeberg.org/ifreund/zig-wayland/archive/%{zig_wayland_commit}.tar.gz#/zig-wayland-%{zig_wayland_commit}.tar.gz Source25: https://deps.files.ghostty.org/wayland-%{wayland_commit}.tar.gz#/ghostty-wayland-%{wayland_commit}.tar.gz Source26: https://deps.files.ghostty.org/wayland-protocols-%{wayland_protocols_commit}.tar.gz#/ghostty-wayland-protocols-%{wayland_protocols_commit}.tar.gz Source27: https://github.com/KDE/plasma-wayland-protocols/archive/%{plasma_protocols_commit}/plasma-wayland-protocols-%{plasma_protocols_commit}.tar.gz Source28: https://github.com/jcollie/ghostty-gobject/releases/download/%{ghostty_gobject_version}/ghostty-gobject-%{ghostty_gobject_version}.tar.zst %global fetch_all %{lua: \ for i = 10, 28 do \ print("%zig_fetch %{SOURCE" .. i .. "}\\n") \ end \ } Provides: bundled(utfcpp) = %{utfcpp_version} Provides: bundled(z2d) = %{z2d_commit} Provides: bundled(SPIRV-Cross) = %{spirv_cross_commit} Provides: bundled(libvaxis) = %{libvaxis_commit} Provides: bundled(glslang) = %{glslang_version} Provides: bundled(highway) = %{highway_commit} Provides: bundled(libxev) = %{libxev_commit} Provides: bundled(imgui) = %{imgui_commit} Provides: bundled(wuffs) = %{wuffs_version} Provides: bundled(ziglyph) = %{ziglyph_commit} Provides: bundled(zf) = %{zf_commit} Provides: bundled(zigimg) = %{zigimg_commit} Provides: bundled(zg) = %{zg_commit} Provides: bundled(zig-wayland) = %{zig_wayland_commit} Provides: bundled(wayland) = %{wayland_commit} Provides: bundled(wayland-protocols) = %{wayland_protocols_commit} Provides: bundled(plasma-wayland-protocols) = %{plasma_protocols_commit} Provides: bundled(simdutf) = 5.2.8 # only the generated output is vendored Provides: bundled(glad2) = 2.0.0 # the fonts are included with ghostty and are embedded directly into the executable # https://github.com/ghostty-org/ghostty/blob/v1.0.0/src/font/embedded.zig # CodeNewRoman OFL-1.1 # GeistMono OFL-1.1 # Inconsolata OFL-1.1 # JetBrainsMono OFL-1.1 # JuliaMono OFL-1.1 # KawkabMono OFL-1.1 # Lilex OFL-1.1 # MonaspaceNeon OFL-1.1 # NotoEmoji OFL-1.1 # CozetteVector MIT # NerdFont MIT AND OFL-1.1 Provides: bundled(font(JetBrainsMonoNerdFont)) = 2.3.0 # the rest are used for test cases and NOT included in the final executable # see comment in 'src/font/embedded.zig' Provides: bundled(font(NotoEmoji)) = 2.034 Provides: bundled(font(KawkabMono)) = 0.501 Provides: bundled(font(Lilex)) = 2.200 Provides: bundled(font(CodeNewRoman)) = 2.000 Provides: bundled(font(Inconsolata)) = 3.001 Provides: bundled(font(GeistMono)) = 1.2.0 Provides: bundled(font(JetBrainsMono)) = 2.3.0 Provides: bundled(font(JuliaMono)) = 0.055 Provides: bundled(font(CozetteVector)) = 1.22.2 Provides: bundled(font(MonaspaceNeon)) = 1.000 ExclusiveArch: %{zig_arches} BuildRequires: gcc BuildRequires: desktop-file-utils BuildRequires: (zig >= 0.14 with zig < 0.15) BuildRequires: zig-rpm-macros BuildRequires: pkg-config # glslang in the fedora repos is too new #BuildRequires: pkgconfig(glslang) BuildRequires: pkgconfig(simdutf) # font backend BuildRequires: pkgconfig(bzip2) BuildRequires: pkgconfig(freetype2) BuildRequires: pkgconfig(fontconfig) BuildRequires: pkgconfig(harfbuzz) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(oniguruma) BuildRequires: pkgconfig(libxml-2.0) # app runtime BuildRequires: pkgconfig(gtk4) BuildRequires: gtk4-layer-shell-devel BuildRequires: pkgconfig(libadwaita-1) BuildRequires: blueprint-compiler BuildRequires: libX11-devel # docs BuildRequires: pandoc-cli # for signature verification BuildRequires: minisign Requires: %{name}-terminfo = %{version}-%{release} Requires: %{name}-shell-integration = %{version}-%{release} Requires: %{name}-themes = %{version}-%{release} %description Ghostty is a terminal emulator that differentiates itself by being fast, feature-rich, and native. While there are many excellent terminal emulators available, they all force you to choose between speed, features, or native UIs. Ghostty provides all three. %if %{with lib} %package -n libghostty Summary: ghostty terminal library %description -n libghostty ghostty terminal library %package -n libghostty-static Summary: static ghostty terminal libary %description -n libghostty-static static ghostty terminal libary %package -n libghostty-devel Summary: development files for libghostty Requires: libghostty BuildArch: noarch %description -n libghostty-devel development files for libghostty %endif %package bash-completion Summary: Bash completion for %{name} BuildArch: noarch Requires: %{name} = %{version}-%{release} Requires: bash-completion Supplements: (%{name} and bash-completion) %description bash-completion Bash command line completion support for %{name}. %package zsh-completion Summary: Zsh completion for %{name} BuildArch: noarch Requires: %{name} = %{version}-%{release} Requires: zsh Supplements: (%{name} and zsh) %description zsh-completion Zsh command line completion support for %{name}. %package fish-completion Summary: Fish completion for %{name} BuildArch: noarch Requires: %{name} = %{version}-%{release} Requires: fish Supplements: (%{name} and fish) %description fish-completion Fish command line completion support for %{name}. %package shell-integration Summary: Shell integration scripts for %{name} BuildArch: noarch %description shell-integration shell-integration for %{name} %package nvim-plugin Summary: Neovim plugin for %{name} BuildArch: noarch Supplements: (%{name} and nvim) %description nvim-plugin Neovim plugin for %{name} %package vim-plugin Summary: Vim plugin for %{name} BuildArch: noarch Supplements: (%{name} and vim) %description vim-plugin Vim plugin for %{name} %package bat-syntax Summary: Bat syntax for %{name} BuildArch: noarch Supplements: (%{name} and bat) %description bat-syntax Bat syntax for %{name} %package nautilus Summary: Nautilus extension for %{name} BuildArch: noarch Supplements: (%{name} and nautilus) %description nautilus Nautilus extension for %{name} %package terminfo Summary: terminfo for %{name} BuildArch: noarch Requires: %{name} = %{version}-%{release} Requires: ncurses-base %if 0%{?fedora} >= 42 Requires: ncurses-term %endif %description terminfo terminfo for %{name} %package themes Summary: Themes for %{name} BuildArch: noarch %description themes Themes for %{name} %package docs Summary: Documentation for %{name} BuildArch: noarch %description docs Documentation for %{name} %prep #/usr/bin/minisign -V -m %{SOURCE0} -x %{SOURCE1} -P %{public_key} %setup -q -n ghostty-%{ghostty_commit} %fetch_all # stubbing some packages that aren't needed # libxml2 mkdir %{_zig_cache_dir}/p/N-V-__8AAG3RoQEyRC2Vw7Qoro5SYBf62IHn3HjqtNVY6aWK # pixels mkdir %{_zig_cache_dir}/p/N-V-__8AADYiAAB_80AWnH1AxXC0tql9thT-R-DYO1gBqTLc %build # Building GTK frontend %zig_build %{gtk_options} # print out the build config ./zig-out/bin/ghostty +version %if %{with lib} # Building libghostty %zig_build %{lib_options} %endif %install mkdir -p %{buildroot}%{_datadir} %zig_install %{gtk_options} %if 0%{?fedora} >= 42 rm %{buildroot}%{_datadir}/terminfo/g/ghostty %endif %if %{with lib} %zig_install %{lib_options} %endif %find_lang com.mitchellh.ghostty %check %zig_test desktop-file-validate %{buildroot}%{_datadir}/applications/com.mitchellh.ghostty.desktop %files -f com.mitchellh.ghostty.lang %license LICENSE %{_bindir}/ghostty %{_datadir}/applications/com.mitchellh.ghostty.desktop %{_datadir}/kio/servicemenus/com.mitchellh.ghostty.desktop %{_datadir}/icons/hicolor/*/apps/com.mitchellh.ghostty.png %{_metainfodir}/com.mitchellh.ghostty.metainfo.xml %{_mandir}/man1/ghostty.1.* %{_mandir}/man5/ghostty.5.* %if %{with lib} %files -n libghostty %{_libdir}/libghostty.so %files -n libghostty-static %{_libdir}/libghostty.a %files -n libghostty-devel %{_includedir}/ghostty.h %endif %files bash-completion %{bash_completions_dir}/ghostty.bash %files zsh-completion %{zsh_completions_dir}/_%{name} %files fish-completion %{fish_completions_dir}/%{name}.fish %files shell-integration %{_datadir}/ghostty/shell-integration %files nvim-plugin %{_datadir}/nvim/site/compiler/ghostty.vim %{_datadir}/nvim/site/ftdetect/ghostty.vim %{_datadir}/nvim/site/ftplugin/ghostty.vim %{_datadir}/nvim/site/syntax/ghostty.vim %files vim-plugin %{_datadir}/vim/vimfiles/compiler/ghostty.vim %{_datadir}/vim/vimfiles/ftdetect/ghostty.vim %{_datadir}/vim/vimfiles/ftplugin/ghostty.vim %{_datadir}/vim/vimfiles/syntax/ghostty.vim %files bat-syntax %{_datadir}/bat/syntaxes/ghostty.sublime-syntax %files nautilus %{_datadir}/nautilus-python/extensions/ghostty.py %files terminfo %if 0%{?fedora} < 42 %{_datadir}/terminfo/g/ghostty %endif %{_datadir}/terminfo/x/xterm-ghostty %files themes %{_datadir}/ghostty/themes/ %files docs %doc README.md %{_datadir}/ghostty/doc/ %changelog * Mon Jun 09 2025 Jan200101 - 1.1.2-5 - rebuilt * Mon May 19 2025 Jan200101 - 1.1.2-4 - rebuild against updated simdutf * Thu Apr 17 2025 Jan200101 - 1.1.2-3 - remove ghostty terminfo, ncurses bundles it now * Wed Apr 16 2025 Jan200101 - 1.1.2-2 - rebuild for f42 * Fri Feb 14 2025 Jan200101 - 1.1.2-1 - Update to 1.1.2 * Fri Jan 31 2025 Jan200101 - 1.1.0-1 - update to 1.1.0 - remove sentry integration - unvendor freetype2, harfbuzz, fontconfig and oniguruma - remove source teminfo and termcap files * Wed Jan 01 2025 Jan200101 - 1.0.1-2 - bump release * Tue Dec 31 2024 Jan200101 - 1.0.1-1 - update to 1.0.1 * Mon Dec 30 2024 Jan200101 - 1.0.0-1 - initial release