Commit Graph

96 Commits (2f61ba036ed4d0013f34414728938bf7825219c8)

Author SHA1 Message Date
Mitchell Hashimoto d2f86028bb
Use patched Zig 0.15.2 on macOS to avoid Xcode 26.4 issue
This updates our Nix flake to use the Homebrew bottled Zig 0.15.2 which
contains a patch to work around the issue with Zig 0.15.x and Xcode
26.4.
2026-04-21 09:40:47 -07:00
Jeffrey C. Ollie f53d3ab8a3
nix: update to the latest zon2nix 2026-04-15 11:21:25 -05:00
Jeffrey C. Ollie 1443e7a9cd
zon2nix: use github mirror 2026-04-12 22:46:57 -05:00
Jeffrey C. Ollie f29d5d4150
zon2nix: update to a version that is compatible with Zig 0.16
The `zon2nix` binary is now compiled with Zig 0.16, but it still produces
Zig 0.15 compatible output (in fact the output is identical to previous
versions).
2026-04-12 21:44:44 -05:00
Jeffrey C. Ollie c2e2a3b7f9
flake: make building package list more flexible 2026-04-06 23:41:24 -05:00
Jeffrey C. Ollie 4ae155be59
flake: ensure that packages don't get lost 2026-04-06 23:22:56 -05:00
Jeffrey C. Ollie dedc3fce86
libghostty-vt: build nix package on all platforms 2026-04-06 22:51:56 -05:00
Jeffrey C. Ollie 1bd7c19dac
nix: add option to disable simd in libghostty-vt package 2026-04-04 15:06:19 -05:00
Jeffrey C. Ollie 4f825e87f5
add a nix package (with CI tests) for libghostty-vt 2026-04-03 16:28:21 -05:00
Luis Quiñones 220d6fd43d
nix: add systems input and fix zig follows 2026-03-20 04:11:25 -05:00
faukah 9503fa0786
nix: bump zig-overlay version 2026-03-11 17:39:21 +01:00
Jacob Sandlund 79f0bfe374
nix: update ucs-detect to latest master 2026-02-23 09:23:42 -05:00
Caleb Norton 1284c9d4ba feat(nix): enhance overlays 2026-02-09 00:11:47 -06:00
Caleb Norton 1c023c6519 chore: nix typos and deprecations 2026-02-08 16:20:41 -06:00
faukah db8623e257
flake.nix: drop desc argument for runVM function
The current runVM function gets called only with a module and without a desc,
resulting in an error when running `nix flake show` or similar
commands.

This commit drops the `desc` argument to `runVM` and gets rid of that problem.
2026-01-30 20:44:48 +01:00
Leah Amelia Chen 8deecac6fb
nix: clean up flake
- Don't expose package attributes that won't build (e.g. on macOS)

- Make the flake generally easier to read since there's none of that
`builtin.foldl' recursiveUpdate` nonsense anymore
2026-01-22 01:15:16 +08:00
MithicSpirit d512de7e78
nix: update zon2nix
After the last commit, zon2nix required recompiling zig, which caused
slow build times and CI failures.
2026-01-12 12:53:21 -05:00
MithicSpirit 5c8c7c627c
nix: update nixpkgs, remove zig.hook, and remove x11-gnome
As of NixOS/nixpkgs#473413[1], `zig.hook` no longer supports
`zig_default_flags`, and now they can and must be provided in
`zigBuildFlags` instead.

Updating also requires removing gnome-xorg since it has been removed
from nixpkgs.

[1] https://github.com/NixOS/nixpkgs/pull/473413
2026-01-11 20:17:12 -05:00
Mitchell Hashimoto 4adc5ed850
Nix VM integration tests (#8339)
This adds a couple of Nix-based VM integration tests:

- Does `ghostty +version` run successfully?
- Can we create a new terminal window? (This is detected by setting the
background to a color that doesn't appear
normally on the desktop and seeing if we can detect that color in a
screenshot).

Obviously more can be done but I thought that these would be a couple of
good first steps.

The whole test suite can be run with `nix flake check`. Individual tests
can be run with a command like this:

```
nix run .#check.x86_64-linux.<test name>.driver
```
2025-12-15 09:47:32 -08:00
Jeffrey C. Ollie ca8313570c
nix: add vm-based integration tests 2025-11-20 08:30:08 -06:00
Jeffrey C. Ollie 10fcd9111c
nix: make 'nix flake check' happy 2025-11-20 08:30:08 -06:00
Jeffrey C. Ollie 701a2a1e05
gtk: update nixpkgs and zig-gobject for Gnome 49 2025-11-20 08:28:25 -06:00
Mitchell Hashimoto a315f8f32e
nix: add ucs-detect
This makes `ucs-detect` available in our Nix environment so that we can
run tests on our Unicode support. In the future, I'd like to modify our
CI to run this too.

This also adds a `./test/ucs-detect.sh` script that runs `ucs-detect`
with consistent options that match the upstream test styles.
2025-11-06 09:22:18 -08:00
Caleb Norton d4f474bb35 nix: don't use deprecated pkgs.system
'system' has been renamed to/replaced by 'stdenv.hostPlatform.system'
https://github.com/NixOS/nixpkgs/pull/456527
2025-11-02 13:21:12 -06:00
Mitchell Hashimoto 06ad3b77b7
Zig 0.15.2 (#9200) 2025-10-14 07:11:10 -07:00
Mitchell Hashimoto a41f59837e
nix: update to unstable for Zig 0.15 in package 2025-10-03 07:10:44 -07:00
Mitchell Hashimoto d02770d292
zig-15: build binary builds 2025-10-03 07:10:41 -07:00
Jeffrey C. Ollie d4bc73a9d6
update to the latest zon2nix 2025-09-20 17:02:24 -05:00
Jeffrey C. Ollie 6d3bab725c
nix: remove unnecessary input override 2025-09-07 10:32:46 -05:00
Jeffrey C. Ollie 314191737d
update zon2nix to version that builds with Zig 0.15 2025-09-06 09:10:49 -05:00
Jeffrey C. Ollie a18332828a
nix: update zon2nix
- Builds with Zig 0.15 now (but still works just fine with Zig
  0.14 projects).
- Fixes a double-free if nix-prefetch-git can't be found or errors out
- Adds support for generating Flatpak package metadata natively.
2025-08-23 21:31:00 -05:00
Mitchell Hashimoto f87213c2f6
build: add run-valgrind and test-valgrind steps
This adds two explicit `zig build` steps: `run-valgrind` and
`test-valgrind` to run the Ghostty exe or tests under Valgrind,
respectively.

This simplifies the manual Valgrind calls in a few ways:

1. It automatically sets the CPU to baseline, which is a frequent and
   requirement for Valgrind on newer CPUs, and generally safe.

2. It sets up the rather complicated set of flags to call Valgrind with,
   importantly setting up our suppressions.

3. It enables pairing it with the typical and comfortable workflow of
   specifying extra args (with `--`) or flags like `-Dtest-filter` for
   tests.
2025-08-20 11:43:48 -07:00
Jeffrey C. Ollie 6032732001
contributing: add some notes about running valgrind 2025-08-20 09:03:48 -05:00
Naïm Camille Favier c61e36b035
nix: use rev instead of ref for flake inputs
Works around https://git.lix.systems/lix-project/lix/issues/520
2025-07-13 00:40:19 +02:00
Naïm Camille Favier ad3f837b36
nix: fix flake input
Setting `zig/flake-compat` to follow `""` (the current flake, ghostty)
is incorrect and introduces an unnecessary dependency cycle.
2025-07-13 00:32:15 +02:00
Jeffrey C. Ollie 98309e3226
nix: update to Nix 25.05 and Zig 0.14.1
Update to Nix 25.05 which gets us GTK 4.18, libadwaita 1.7, and Zig 0.14.1.

Since Nix updated to Zig 0.14.1, the devshell has been switched to Zig 0.14.1
from zig-overlay as well.

Fixes #7305
2025-05-26 10:47:43 -05:00
trag1c f0ade53fd2 ci: add a script and workflow for requesting i18n review 2025-04-10 16:40:28 -07:00
Jeffrey C. Ollie 648e0a06ab
CI: Add checks for blueprint compiler / Nix refactors
1. Refactored Nix devshell/package to make it easier to keep
   LD_LIBRARY_PATH & buildInputs in sync (plus make it easier to re-use
   in other Nix environment).
2. Added a CI job to ensure that Blueprints are formatted correctly and
   that they will compile using `blueprint-compiler` 0.16.0.
3. Reformatted all Blueprints with `blueprint-compiler format`.
2025-03-18 16:12:49 -05:00
Jeffrey C. Ollie 5cd8ebdafd
update zon2nix
Upstream is now mostly pure Zig and the build.zig.zon.* files are
generated directly by zon2nix. The JSON file is no longer used as an
intermediate file but is retained for downstream packager usage.
2025-03-16 01:09:52 -05:00
Mitchell Hashimoto b123b14686
update zig2nix 2025-03-12 15:56:24 -07:00
Mitchell Hashimoto 7e2286eb8c
Zig 0.14 2025-03-11 14:39:04 -07:00
Jeffrey C. Ollie 3ba4864f6c
core: update zig2nix to use explicit Zig version from Nix
This will avoid build breakage in the near future as Zig 0.14 is coming
to Nix.
2025-03-07 11:46:30 -06:00
Jeffrey C. Ollie 1e3cd89516
macOS: use Nix to get Zig deps 2025-02-12 08:21:16 -06:00
Jeffrey C. Ollie 3a8c934b19 nix: use zig2nix to manage nix cache/deps
This brings the internal package more in line with how the nixpkgs
package is built. It also handles recursive dependencies better than the
current system.
2025-02-11 08:25:34 -08:00
Jeffrey C. Ollie 3159a7bec7
nix: add x11 xfce vm 2025-01-15 20:37:31 -06:00
Jeffrey C. Ollie 423133bc3c
nix: document how to create custom vms 2025-01-15 11:56:19 -06:00
Jeffrey C. Ollie 321119e001
nix vm: more reusability 2025-01-15 10:25:03 -06:00
Jeffrey C. Ollie 268fc1a040
nix vm: simplify vm definition 2025-01-15 10:25:03 -06:00
Jeffrey C. Ollie 450c019b4e
nix vm: add plasma and cinnamon vms 2025-01-15 10:25:03 -06:00
Jeffrey C. Ollie 6be0902c09
nix vm: add documentation, add Gnome/X11 VM 2025-01-15 10:25:02 -06:00