9 Commits

Author SHA1 Message Date
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
Kevin Hovsäter
22b8173164 Fix typos 2023-08-08 14:27:34 +02:00
Mitchell Hashimoto
d114f95165 clean up some of the nix package building 2023-03-13 10:12:32 -07:00
Mitchell Hashimoto
699da6fcfe update mach 2022-10-13 11:03:23 -07:00
Mitchell Hashimoto
d614da2435 make dev/install to add a dev install 2022-07-31 16:11:01 -07:00
Mitchell Hashimoto
9779b565bf nix: add other X11 deps 2022-07-26 15:02:03 -07:00
Mitchell Hashimoto
fc611ec28b nix: update the package to set proper rpath 2022-07-26 14:39:40 -07:00
Mitchell Hashimoto
2be6de7ebd nix: we have a package that builds, but doesn't run 2022-07-26 12:04:51 -07:00
Mitchell Hashimoto
702f54a6fa first attempt at a derivation 2022-07-26 11:38:54 -07:00