From 0ab1b061cc881f130723574c59bd9c493129e608 Mon Sep 17 00:00:00 2001 From: Caleb Spare Date: Sat, 16 Dec 2023 18:22:48 -0800 Subject: [PATCH] update README with Linux dependency tips --- README.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3a60e78e5..f99402ad0 100644 --- a/README.md +++ b/README.md @@ -360,7 +360,10 @@ a work-in-progress. Similar improvements will follow with Linux. ## Developing Ghostty -To build Ghostty, you only need [Zig](https://ziglang.org/) installed. +To build Ghostty, you need [Zig](https://ziglang.org/) installed. + +On Linux, you may need to install additional dependencies. See +[Linux Installation Tips](#linux-installation-tips). The official development environment is defined by Nix. You do not need to use Nix to develop Ghostty, but the Nix environment is the environment @@ -373,7 +376,8 @@ version when I get closer to generally releasing this to ease downstream packagers. You can find binary releases of nightly builds on the [Zig downloads page](https://ziglang.org/download/). -With Zig installed, a binary can be built using `zig build`: +With Zig and necessary dependencies installed, a binary can be built using +`zig build`: ```shell-session $ zig build @@ -427,6 +431,20 @@ the configuration file.** ### Linux Installation Tips +On Linux, you'll need to install header packages for Ghostty's dependencies +before building it. Typically, these are only gtk4 and libadwaita (unless +building with `--static=false`). On Ubuntu, use + +``` +$ sudo apt install libgtk-4-dev libadwaita-1-dev +``` + +On Arch Linux, use + +``` +$ sudo pacman -S gtk4 libadwaita +``` + If you're planning to use a build from source as your daily driver, I recommend using the `-p` (prefix) flag for `zig build` to install Ghostty into `~/.local`. This will setup the proper FHS directory structure