# 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 z2d_version 0.9.0 %global spirv_cross_commit 476f384eb7d9e48613c45179e502a15ab95b6b49 %global libvaxis_commit 7dbb9fd3122e4ffad262dd7c151d80d863b68558 %global glslang_version 14.2.0 %global highway_commit 66486a10623fa0d72fe91260f96c892e41aceb06 %global libxev_commit 34fa50878aec6e5fa8f532867001ab3c36fae23e %global imgui_commit e391fe2e66eb1c96b1624ae8444dc64c23146ef4 %global wuffs_version 0.4.0-alpha.9 %global ziglyph_commit b89d43d1e3fb01b6074bc1f7fc980324b04d26a5 %global zf_commit 3c52637b7e937c5ae61fd679717da3e276765b23 %global ghostty_gobject_version 2025-09-20-20-1 # for improved wayland support %global zig_wayland_commit 1b5c038ec10da20ed3a15b0b2a6db1c21383e8ea %global wayland_commit 9cb3d7aa9dc995ffafdbdef7ab86a949d0fb0e7d %global wayland_protocols_commit 258d8f88f2c8c25a830c6316f87d23ce1a0f12d9 %global plasma_protocols_commit db525e8f9da548cffa2ac77618dd0fbe7f511b86 %global uucode_commit f81f8ef8518b8ec5a7fca30ec5fdbc76cc6197df %global pixels_commit d843c2714d32e15b48b8d7eeb480295af537f877 # embedded fonts %global jetbrains_mono_version 2.304 %global nerdfonts_symbol_only_version 3.4.0 # libvaxis dependencies %global zigimg_commit d7b7ab0ba0899643831ef042bd73289510b39906 %global uucode2_commit 5f05f8f83a75caea201f12cc8ea32a2d82ea9732 %global ghostty_commit 3f75c66e8395d7389f05d360d89af567dcd22cba # needed to get rid of a header informing the user the application is compiled in debug mode %global _zig_release_mode fast %global zig_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_string}" \ -Dstrip=false \ -Dsentry=false \ -Demit-docs=true \ -Demit-terminfo=false \ -Demit-termcap=false \ -Demit-themes=false \ } %global gtk_options %{shrink: \ -Dapp-runtime=gtk \ } %global lib_options %{shrink: \ -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 # this is not libghostty-vt which is always enabled %bcond lib 0 # We ship a .pc file but don't want to have a dep on pkg-config. We # strip the automatically generated dep here and instead co-own the # directory. %global __requires_exclude pkg-config Name: ghostty Version: 1.2.3.pre %global version_string 1.2.3-pre Release: 1%{?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 # zig-wayland: MIT # zig-gobject: 0BSD # uucode: MIT # wayland: MIT # wayland-protocols: MIT # plasma-wayland-protocols LGPL-2.1-only # 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 # pixels: CC0-1.0 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 AND CC0-1.0 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 # try to avoid downloading dependencies from deps.files.ghostty.org Source10: https://github.com/nemtrif/utfcpp/archive/refs/tags/v%{utfcpp_version}/utfcpp-%{utfcpp_version}.tar.gz Source11: https://github.com/vancluever/z2d/archive/refs/tags/v%{z2d_version}/z2d-%{z2d_version}.tar.gz Source12: https://github.com/KhronosGroup/SPIRV-Cross/archive/%{spirv_cross_commit}/SPIRV-Cross-%{spirv_cross_commit}.tar.gz Source13: https://github.com/rockorager/libvaxis/archive/%{libvaxis_commit}/libvaxis-%{libvaxis_commit}.tar.gz Source14: https://github.com/KhronosGroup/glslang/archive/refs/tags/%{glslang_version}/glslang-%{glslang_version}.tar.gz Source15: https://github.com/google/highway/archive/%{highway_commit}/highway-%{highway_commit}.tar.gz Source16: https://github.com/mitchellh/libxev/archive/%{libxev_commit}/libxev-%{libxev_commit}.tar.gz Source17: https://github.com/ocornut/imgui/archive/%{imgui_commit}/imgui-%{imgui_commit}.tar.gz Source18: https://github.com/google/wuffs/archive/refs/tags/v%{wuffs_version}/wuffs-%{wuffs_version}.tar.gz Source19: https://deps.files.ghostty.org/ziglyph-%{ziglyph_commit}.tar.gz Source20: https://github.com/natecraddock/zf/archive/%{zf_commit}/zf-%{zf_commit}.tar.gz Source21: https://github.com/ivanstepanovftw/zigimg/archive/%{zigimg_commit}/zigimg-%{zigimg_commit}.tar.gz Source22: https://codeberg.org/ifreund/zig-wayland/archive/%{zig_wayland_commit}.tar.gz#/zig-wayland-%{zig_wayland_commit}.tar.gz Source23: https://deps.files.ghostty.org/wayland-%{wayland_commit}.tar.gz#/ghostty-wayland-%{wayland_commit}.tar.gz Source24: https://deps.files.ghostty.org/wayland-protocols-%{wayland_protocols_commit}.tar.gz#/ghostty-wayland-protocols-%{wayland_protocols_commit}.tar.gz Source25: https://github.com/KDE/plasma-wayland-protocols/archive/%{plasma_protocols_commit}/plasma-wayland-protocols-%{plasma_protocols_commit}.tar.gz Source26: https://github.com/ghostty-org/zig-gobject/releases/download/%{ghostty_gobject_version}/ghostty-gobject-%{ghostty_gobject_version}.tar.zst Source27: https://github.com/jacobsandlund/uucode/archive/%{uucode_commit}/uucode-%{uucode_commit}.tar.gz Source28: https://github.com/jacobsandlund/uucode/archive/%{uucode2_commit}/uucode-%{uucode2_commit}.tar.gz Source29: https://github.com/make-github-pseudonymous-again/pixels/archive/%{pixels_commit}/uucode-%{pixels_commit}.tar.gz # embedded fonts Source30: https://github.com/JetBrains/JetBrainsMono/releases/download/v%{jetbrains_mono_version}/JetBrainsMono-%{jetbrains_mono_version}.zip Source31: https://github.com/ryanoasis/nerd-fonts/releases/download/v%{nerdfonts_symbol_only_version}/NerdFontsSymbolsOnly.tar.xz#/NerdFontsSymbolsOnly-%{nerdfonts_symbol_only_version}.tar.xz %global fetch_all %{lua: \ for i = 10, 31 do \ print("%zig_fetch %{SOURCE" .. i .. "}\\n") \ end \ } Provides: bundled(utfcpp) = %{utfcpp_version} Provides: bundled(z2d) = %{z2d_version} 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(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 Provides: bundled(uucode) = %{uucode_commit} Provides: bundled(uucode) = %{uucode2_commit} # 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 # These are embedded into the program Provides: bundled(font(JetBrainsMono)) = %{jetbrains_mono_version} Provides: bundled(font(NerdFontsSymbolsOnly)) = %{nerdfonts_symbol_only_version} # These are used for testing only Provides: bundled(font(JetBrainsMonoNerdFont)) = 2.3.0 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.15 with zig < 0.16) BuildRequires: zig-rpm-macros BuildRequires: systemd-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%{?_isa} = %{version}-%{release} BuildArch: noarch %description -n libghostty-devel development files for libghostty %endif %package -n libghostty-vt Summary: ghostty terminal library %description -n libghostty-vt ghostty virtual terminal library %package -n libghostty-vt-devel Summary: development files for libghostty-vt Requires: libghostty-vt%{?_isa} = %{version}-%{release} %description -n libghostty-vt-devel development files for libghostty-vt %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 # fix jetbrains having the incorrect hash mv \ %{_zig_cache_dir}/p/N-V-__8AADWVlwASf7XCdCqpjVW5Jv_7oogANJ_H4_dIoEp6 \ %{_zig_cache_dir}/p/N-V-__8AAIC5lwAVPJJzxnCAahSvZTIlG-HhtOvnM1uh-66x # fix nerdfonts having the incorrect hash mv \ %{_zig_cache_dir}/p/N-V-__8AAI9HTABr_zPUAKuMp_GR5p_z-kjPIX_e3EtLjOqI \ %{_zig_cache_dir}/p/N-V-__8AAMVLTABmYkLqhZPLXnMl-KyN38R8UVYqGrxqO26s %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} # Ghostty optionally distributes themes from the iTerm2-Color-Schemes # repo which contains lots of themes with no specified License # and a few that were taken from proprietary applications # until that is figured out the themes package will be stubbed mkdir -p %{buildroot}%{_datadir}/ghostty/themes/ %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 # Broken on 0.15.2 #%%zig_test desktop-file-validate %{buildroot}%{_datadir}/applications/com.mitchellh.ghostty.desktop %post %systemd_user_post app-com.mitchellh.ghostty.service %preun %systemd_user_preun app-com.mitchellh.ghostty.service %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.* %{_userunitdir}/app-com.mitchellh.ghostty.service %{_datadir}/dbus-1/services/com.mitchellh.ghostty.service %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 -n libghostty-vt %{_libdir}/libghostty-vt.so.0 %{_libdir}/libghostty-vt.so.0.1.0 %files -n libghostty-vt-devel %{_libdir}/libghostty-vt.so %dir %{_datadir}/pkgconfig %{_datadir}/pkgconfig/libghostty-vt.pc %{_includedir}/ghostty/vt.h %{_includedir}/ghostty/vt/ %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