Packaging Ghostty for Flatpak/Flathub #3201
Replies: 23 comments 51 replies
-
|
This should be a discussion since there isn't a directly actionable result from this. 😄 |
Beta Was this translation helpful? Give feedback.
-
|
As an alternative solution, it might be deemed viable to host a custom repository (ideally on the Ghostty website) and allow users to install the repository with a flatpakref. |
Beta Was this translation helpful? Give feedback.
-
|
There is no point in packaging this as a Flatpak until Ghostty gets a solution like Ptyxis which runs an agent on the host. As far as I know, that does currently not exist. |
Beta Was this translation helpful? Give feedback.
-
|
There appears to be another issue with using The way I can reproduce this is as follows: #!/usr/bin/env bash
set -e
VERSION=1.0.0
ARCHIVE=ghostty-source.tar.gz
wget "https://release.files.ghostty.org/${VERSION}/${ARCHIVE}"
tar -xf "${ARCHIVE}"
rm "${ARCHIVE}"
cd ghostty-source
ZIG_GLOBAL_CACHE_DIR=vendor ./nix/build-support/fetch-zig-cache.sh
zig build --system vendor/p |
Beta Was this translation helpful? Give feedback.
-
|
I managed to get things to build, albeit in a way that's not suitable for Flathub: The code for this proof of concept is found in https://github.com/yorickpeterse/ghostty-flatpak. To build, run the following: bash deps.sh
flatpak-builder --disable-rofiles-fuse --force-clean --user --install-deps-from=flathub --repo=repo --install builddir org.ghostty.ghostty.ymlThe |
Beta Was this translation helpful? Give feedback.
-
|
There seems to already be a manifest and Flatpak integration in the repo, but it's a bit broken and no longer builds: |
Beta Was this translation helpful? Give feedback.
-
|
For those interested in Flatpak/Flathub support, this is currently blocked by #3616. Help with said issue would be greatly appreciated 😃 |
Beta Was this translation helpful? Give feedback.
-
|
While I like to chime in on having a Flatpak, I also want to point to notes from another terminal emulator that recommends native packaging over Flatpak: https://wezfurlong.org/wezterm/install/linux.html?h=flatpak#installing-on-linux-via-flathub |
Beta Was this translation helpful? Give feedback.
-
|
Natively installed terminal apps like Btop don't open from the app launcher when I have Ptyxis as a flatpak. |
Beta Was this translation helpful? Give feedback.
-
|
dont know if this might help, but you could download all dependencies before the build starts. I did the same here for prusa slicer: https://github.com/flathub/com.prusa3d.PrusaSlicer/blob/d32b6e63bb7b6b690ac40749d462898c62a6d141/com.prusa3d.PrusaSlicer.yml#L97 |
Beta Was this translation helpful? Give feedback.
-
|
https://github.com/yorickpeterse/ghostty-flatpak is now in a sort of OK state. That is, we pre-build an archive containing the dependencies and then host that using a GitHub release. It's a bit of a hack, but it's the most reliable way of providing the dependencies such that we can use this for a future Flathub package. Unfortunately, the resulting Flatpak application isn't terribly useful. Due to the Flatpak integration being broken, the application runs in its own environment. While it does have access to the file system, it won't be able to properly run host executables as various directories in As such, there's no point in submitting the package to Flathub at this stage. Thus, until the linked issue is resolved there's nothing more I can do. |
Beta Was this translation helpful? Give feedback.
-
|
As per this commit I'm now able to build a Flatpak without having to host any dependencies myself, though it requires a patch until #6647 is merged. Unfortunately, running Ghostty is a different story: the Flatpak will start up, but the terminal screen is essentially blank and doesn't respond to any input: The logs show the following: I suspect the following is the most interesting part: I'm guessing that the shell process isn't started correctly, though again I'm not familiar enough with the Ghostty codebase or its Flatpak integration to determine what is going on and how to resolve this issue. So once again, help would be much appreciated 😃 |
Beta Was this translation helpful? Give feedback.
-
|
Hi, just curious, which name will be used for Flatpak package? |
Beta Was this translation helpful? Give feedback.
-
|
A small status update: The Flatpak build manifest has been merged to Not all features work right now, and below is what I found while testing:
If you are interested in running the latest build, you can download it from the latest Actions run. Select the first ✅ one, then scroll down to Artifacts and you will find the For submission into Flathub, I'm not quite sure how to go about this. Ideally I think Ghostty should be built using the project's own CI and uploaded directly to Flathub similar to how OBS and Firefox does it, but I don't see any obvious pointers in Flathub documentation about applying for that publishing pipeline. |
Beta Was this translation helpful? Give feedback.
-
|
Tracker for a few remaining TODOs to be eligible for Flathub: The current metainfo lacks a few components required by Flathub Guidelines, which are:
Some quality points for an app to be featured as an "App of the day":
Regarding direct uploads (assuming that's desirable):
|
Beta Was this translation helpful? Give feedback.
-
|
Hi There, I guess, it might be frustrating to see to mention here since it's plaguing discussions as well as issues but I think this one is different than them since this is related to the flatpak package (imo). I just built the flatpak on my localhost and installed it. When I start ghostty, I see below warning: Is this due to my setup or something else? |
Beta Was this translation helpful? Give feedback.
-
|
@alaviss wow what a mess.. 😔 which configuration do you mean? Where should we set |
Beta Was this translation helpful? Give feedback.
-
|
Interestingly |
Beta Was this translation helpful? Give feedback.
-
|
One more quirk: it seems the Even with |
Beta Was this translation helpful? Give feedback.
-
|
Looks like actions like opening the config and scrollback buffer might be broken. xdg-open seems to be available in the runtime so I’m not sure yet if the issue is with open.zig. |
Beta Was this translation helpful? Give feedback.
-
|
Can someone add a github action to upload the flatpak bundle to nightly build? |
Beta Was this translation helpful? Give feedback.
-
|
In case anyone want to install the Flatpak builds without logging into GH, nightly.link comes in handy.
EDIT: As of #9926, these links no longer work as nightly.link does not support trigger events other than push. |
Beta Was this translation helpful? Give feedback.



Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm working on packaging Ghostty for Flatpak/Flathub. This brings some challenges with it, such as Flathub not allowing network access during the build process. The packaging guidelines outline some steps to take to build from a local package cache. Unfortunately, this introduces the following problems:
zig build --systemthe-Demit-docsoption is implied. This is unnecessary for Flatpak but results in build errors because Pandoc isn't installed in the sandboxFor problem one I created the following script to remove large redundant directories (e.g. some dependencies include 40 MiB worth of screenshots or 50 MiB test directories):
rm -rf vendor/p/*/{test,Test,screenshots,result,doc,data}This isn't ideal, but it ends up cutting the directory/archive size in half, though the resulting 200 MiB is still too large to include directly into a repository somewhere (and Flatpak doesn't support Git LFS for build sources). Ideally Ghostty release provide an archive containing just the dependencies such that this can be added as an extra dependency.
For problem two it appears there's no sensible solution right now. Probably the best option is to allow
-Demit-docs=falseto override the default implied by--system.Current status
#3201 (comment)
Related issues
Beta Was this translation helpful? Give feedback.
All reactions