60 Commits

Author SHA1 Message Date
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
Jeffrey C. Ollie
ec5b26347f Add formatter output to flake so that 'nix fmt' does the right thing. 2023-12-12 11:55:44 -06:00
Jeffrey C. Ollie
c4ed1f1b80 Use Alejandra to format Nix modules. 2023-12-12 11:38:39 -06:00
Chris Marchesi
42c307ef2a nix: Update nixpkgs-zig-0-12 source
With the nixpkgs LLVM 17 PR (NixOS/nixpkgs#258614) now merged, we can
update this flake input to base off of master so that we can take
advantage of the built LLVM derivation when it's ready.

This only leaves Zig 0.12 which should mean a much reduced build time.

Note that of this writing, the derivations are still queued, so until
that happens, this update means a rebuild of LLVM 17 for anyone using
the ghostty package.
2023-12-08 14:51:04 -08:00
Mitchell Hashimoto
24c64d4b44 nix: make devshell platform-specific 2023-12-08 07:58:52 -08:00
RGBCube
5846d991e9 Add garnix cache and clean up all nix code 2023-12-08 16:52:58 +03:00
RGBCube
c86c558571 Add packages.default property
This is useful for doing `nix run $flakeref` and other nix tools
2023-12-06 23:50:44 +03:00
Chris Marchesi
01663c8b29 nix: update zigCacheHash, mention that building pkg requires src
This updates the zigCacheHash and just adds a note mentioning that using
the package will require you to rebuild LLVM 17 and Zig, and directs
people to use the devShell until this is resolved.

This is likely good advice for most people until such time that both are
in nixpkgs (or at least LLVM 17 as it's by far the bigger culprit here).
2023-11-21 15:59:24 -08:00
Chris Marchesi
2671215211 nix: fix package build
This fixes the Nix *package* build (read: not devShell, which is not
touched) so that it builds, and also conforms to what is generally seen
for a Zig project in nixpkgs.

The highlights:

* We use a Zig 0.12 derivation that I constructed from the Zig 0.11
  derivation, in addition to LLVM 17 updates found in
  NixOS/nixpkgs#258614. This specifically includes the patches that
  address ziglang/zig#15898, and also allows us to take advantage of the
  build hooks included in the Zig toolchain there.

* We pre-download the cache using "zig build --fetch" and a fixed-output
  derivation. This is similar to how the Go builders work in nixpkgs and
  I could see Zig ultimately going in a similar path, given that the
  fetcher part of the build system seems to be shaping up to having a Go
  module system-style DX (mind you, this is a naive opinion right now).

* Finally, cleaned up the derivation so that there's no special fixups
  happening outside of what is defined in the basic nixpkgs workflow.
  This is similar to other Zig projects I looked at (notably River) that
  seem to just include their dependencies in buildInputs and call it a
  day.

One specific change that is worth noting is that this changes the build
mode from ReleaseFast to ReleaseSafe - this is the current default
within the Zig build hook in nixpkgs. If we need ReleaseFast, we'll have
to override this.
2023-11-19 14:21:34 -08:00
Thorsten Ball
d86de34cf1 nix: add latest version of zls to flake.nix
I know not everybody uses ZLS (or LSPs in general) but I think it's very
useful and it's very handy to have it in the `flake.nix` to keep it up
to date with the `zig` version.

As with a lot of my PRs in this project, please consider the following a
disclaimer: I have 0 clue what I'm doing here and if there's a better
way to do what I'm trying to do, let me know!
2023-09-09 15:18:05 +02:00
Mitchell Hashimoto
2df7789f3e update to nix 23.05 2023-08-13 11:53:23 -07:00
Mitchell Hashimoto
a295d1e872 revert back to nix 22.11, see comment 2023-08-08 10:32:49 -07:00