This adds a nix workflow that does the following:
* Checks to see if the Zig cache fixed derivation needs its hash
updated. It does this by downloading a new cache, calculating the
hash, and comparing it against what has already been set. If the hash
is different, the workflow fails.
* Runs a Nix build if the hash is OK, testing the build of
packages.ghostty (using "nix build .")
The cache workflow we use in the build job comes from:
https://github.com/DeterminateSystems/magic-nix-cache-action/Fixes#937.
Flatpak support has been a HUGE pain to keep working, the builds take
forever and cost me real money, and there are very few users. Ideally,
we want to just use native system packagers for each distro. I thought
Flatpak would make it easy to support many distros but that ended up
being false.
This is based on our conversation on Discord and adds a setting for GTK
that allows disabling the GTK single-instance mode.
If this is off, it's possible to start multiple applications from the
same release binary.
Tested like this:
```
$ zig build -Dapp-runtime=gtk -Doptimize=ReleaseFast && ./zig-out/bin/ghostty --gtk-single-instance=false
[... starts new application ...]
```
and
```
$ zig build -Dapp-runtime=gtk -Doptimize=ReleaseFast && ./zig-out/bin/ghostty --gtk-single-instance=true
info: ghostty version=0.1.0-main+42a22893
info: runtime=apprt.Runtime.gtk
info: font_backend=font.main.Backend.fontconfig_freetype
info: dependency harfbuzz=8.0.0
info: dependency fontconfig=21400
info: renderer=renderer.OpenGL
info: libxev backend=main.Backend.io_uring
info(os): LANG is not valid according to libc, will use en_US.UTF-8
info: reading configuration file path=/home/mrnugget/.config/ghostty/config
info(config): default shell source=env value=/usr/bin/zsh
(process:49045): GLib-GIO-WARNING **: 13:55:56.116: Your application did not unregister from D-Bus before destruction. Consider using g_application_run().
[exits]
```
* search for resources dir relative to executing binary on Linux
From Andrew in #241:
This works in all 3 of the possible scenarios I can think of on Linux:
* `zig build` with default prefix into `zig-out`
* `zig build -p ~/local` (my choice when compiling from source)
* ghostty packaged for a linux distribution into /usr/bin and /share
* update README