Commit Graph

195 Commits (main)

Author SHA1 Message Date
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 701a2a1e05
gtk: update nixpkgs and zig-gobject for Gnome 49 2025-11-20 08:28:25 -06:00
Jeffrey C. Ollie bdd2e4d734
build: more Zig 0.15.2 updates (#9217)
- update nixpkgs now that Zig 0.15.2 is available in nixpkgs
- drop hack that worked around compile failures on systems with more
than 32 cores
- enforce patch version of Zig
2025-10-15 11:55:11 -07: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 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
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
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 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
Chip Bilbrey cb5fbc1041 Re-add nix-compat flake input
Its entry in flake.lock is required for shell.nix to operate as it's
been written. Hash values are restored to where they last existed.
2024-12-26 16:21:18 -08:00
Mitchell Hashimoto 1ee7da174b
flake: update to Nix 24.11 2024-12-05 12:15:48 -08:00
Mitchell Hashimoto 5cc853aa6a
flake: update to Nixpkgs 24.05 2024-09-11 11:07:28 -07:00
Mitchell Hashimoto a9deb37071
nix: remove ZLS
Fixes #2171

ZLS has caused us issues in our Nix shell before and I noted when we
first added it that we probably shouldn't. We now pin to release
versions of Zig so I think its reasonable to expect developers to have
ZLS installed themselves with the proper version or not use it at all.
2024-09-03 15:18:04 -07:00
Mitchell Hashimoto 5eff2d88a2
nix: update package to zig 0.13 2024-06-24 15:16:24 -07:00
Mitchell Hashimoto a30e791c85
begin 0.13 update process -- very broken 2024-06-24 15:16:22 -07:00
Mitchell Hashimoto 20f4c86638
update to zig 0.12.1 2024-06-24 10:25:36 -07:00
Mitchell Hashimoto 8258e9029c
nix: revert back to 23.05 for now 2024-06-22 19:37:49 -07:00
isabel 81344faeca
build(nix): include more into source; ignore flake comapct 2024-06-21 18:19:14 +01:00
isabel a73e0183d3
refactor(nix): specify source
this should reduce the amount of rebuilds that need to occur that due to
the souce changing invalidating the cache

also note that a update to nixpkgs-stable had to occur such that the new
lib functions existed
2024-06-21 15:17:43 +01:00
Robbie Vanbrabant bab4abcc6b Nix dev env to not depend on deleted Zig release
This is the result of running `nix flake update zls`.

For some reason updating zig itself doesn't help. There are two mentions
of zig-overlay in the lock file so I imagine that has something to do
with that. As in - the version used by zls was the one with the problem.

Fixes this isssue:

```
$ nix develop --extra-experimental-features flakes --extra-experimental-features nix-command
error: builder for '/nix/store/yhhlna9rbdfcrzyxnl9gpaf2wac2swr7-zig-macos-x86_64-0.12.0-dev.3480+9dac8db2d.tar.xz.drv' failed with exit code 1;
       last 7 log lines:
       >
       > trying https://ziglang.org/builds/zig-macos-x86_64-0.12.0-dev.3480+9dac8db2d.tar.xz
       >   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
       >                                  Dload  Upload   Total   Spent    Left  Speed
       >   0   303    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
       > curl: (22) The requested URL returned error: 403
       > error: cannot download zig-macos-x86_64-0.12.0-dev.3480+9dac8db2d.tar.xz from any mirror
       For full logs, run 'nix-store -l /nix/store/yhhlna9rbdfcrzyxnl9gpaf2wac2swr7-zig-macos-x86_64-0.12.0-dev.3480+9dac8db2d.tar.xz.drv'.
error: 1 dependencies of derivation '/nix/store/wg3w03dlw05rha5cfc7nvllffhzihwnc-zig-0.12.0-dev.3480+9dac8db2d.drv' failed to build
error: 1 dependencies of derivation '/nix/store/x6dhn56cw9ndr496vh50gqafnqf8vyqa-zls.drv' failed to build
error: 1 dependencies of derivation '/nix/store/hrwa46pabh3jvbx71c3194plf9pjifqz-ghostty-env.drv' failed to build
```
2024-06-13 19:24:45 +01:00
Mitchell Hashimoto 2f2d2c3bb1
remove nixpkgs fork for zig 0.12 2024-04-21 10:25:18 -07:00
Mitchell Hashimoto d052ada359
try to use official zig 0.12 for nix package 2024-04-21 10:23:47 -07:00
Mitchell Hashimoto b557542afb
update to zig 0.12 2024-04-21 10:22:52 -07:00
Chris Marchesi decb5d5e7e
nix: update nixpkgs-zig-0-12
This updates the nixpkgs-zig-0-12 to be in line with the current overlay
Zig (0.12.0-dev.3676+21a6a1b0f).
2024-04-18 15:49:39 -07:00
Mitchell Hashimoto e4cbd522e8
update zig 2024-04-18 14:37:05 -07:00
Mitchell Hashimoto bd7d71440e
update zig, fix linux build 2024-04-18 13:27:15 -07:00
Mitchell Hashimoto 973538e30e
update zig 2024-04-17 20:50:50 -07:00
Mitchell Hashimoto 7b70fcb550
update zig and zig-objc 2024-04-17 20:50:50 -07:00
Mitchell Hashimoto 595f24585e
working on more zig breaking changes 2024-04-17 20:50:50 -07:00
Mitchell Hashimoto d8cc05317a
update zig again 2024-04-17 20:50:50 -07:00
Mitchell Hashimoto 5845281e30
update zig 2024-04-17 20:50:50 -07:00
Qwerasd e224ff887f flake: update ZLS 2024-04-04 17:06:44 -04:00
Chris Marchesi 4fa8dcc58c
nix: update nixpkgs-zig-0-12 (re-follow nixos-unstable)
This moves the input back to following nixos-unstable, now that
NixOS/nixpkgs#300028 is there.
2024-04-04 09:32:51 -07:00
Chris Marchesi e8c8c3ca74
nix: update nixpkgs-zig-0-12 (security, ff to staging-next)
This fast-forwards the nixpkgs-zig-0-12 flake input to follow
staging-next instead of nixos-unstable, in response to CVE-2024-3094.

Nixpkgs PR: https://github.com/NixOS/nixpkgs/pull/300028
2024-03-30 02:18:09 -07:00
Chris Marchesi 3d606f4ee2
nix: update nixpkgs-zig-0-12
This updates the nixpkgs-zig-0-12 to be in line with the current overlay
Zig (0.12.0-dev.3405+31791ae15).
2024-03-22 14:49:48 -07:00
Mitchell Hashimoto b7bf59d772
update zig 2024-03-22 11:15:26 -07:00
Chris Marchesi a2c9ac558d
nix: update nixpkgs-zig-0-12
This updates the nixpkgs-zig-0-12 to be in line with the current overlay
Zig (0.12.0-dev.3282+da5b16f9e).
2024-03-13 10:19:00 -07:00
Mitchell Hashimoto b48d24a546
update zig 2024-03-13 09:14:12 -07:00
Chris Marchesi bd9998809d
nix: update nixpkgs-zig-0-12
This updates the nixpkgs-zig-0-12 to be in line with the current overlay
Zig (0.12.0-dev.3192+e2cbbd0c2).
2024-03-10 11:23:33 -07:00
Mitchell Hashimoto 4ecb6307b7
update zig 2024-03-09 15:59:45 -08:00
Mitchell Hashimoto dc9bd68244
update zig 2024-03-08 18:52:35 -08:00