Commit Graph

71 Commits

Author SHA1 Message Date
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
Jeffrey C. Ollie
0b16c1eeba nix vm: maybe get vms working on darwin 2025-01-15 10:25:02 -06:00
Jeffrey C. Ollie
dddc2a50a8 nix vm: more slimming 2025-01-15 10:25:02 -06:00
Jeffrey C. Ollie
0b456d14a4 nix: vms for testing ghostty 2025-01-15 10:24:58 -06:00
Sebastian Estrella
16f81353cc Add default Nix overlay 2024-12-29 07:12:59 -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
Jeffrey C. Ollie
6cbced7078 nix: use stdenv from unstable to build the package 2024-09-28 20:05:56 -05:00
Jeffrey C. Ollie
0a3ca77296 nix: remove tracy from flake.nix 2024-09-28 12:56:39 -05:00
Mitchell Hashimoto
750f7a7fa4 flake: remove unnecessary unstable lib 2024-09-11 11:30:05 -07: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
isabel
982c01feb5 nix: inherit lib from unstable 2024-06-23 13:22:53 +01: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
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
RGBCube
a491381191 nix: make ReleaseFast the default package 2024-03-29 22:24:32 +03:00
Jeffrey C. Ollie
bf34582f54 allow building nix package with different optimizations 2024-03-22 20:28:06 -07:00
Jeffrey C. Ollie
0200f79554 Include the git commit hash in the Nix package. 2024-01-05 23:44:53 -06:00
EdenEast
fac38a9ea2 feat(nix): add cachix binary cache to flake
Nix flake [schema] allows for a top level attribute called `nixConfig`.
This allows a flake to extend a users nix for the specific flake.

This lets us add ghostty's binary cache automatically when using the
repo (nix develop, nix build, ...).

[schema]: https://nixos.wiki/wiki/Flakes#Flake_schema
2024-01-04 13:00:45 -05:00