Commit Graph

67 Commits (f86a3a9b50c269a6af647cadb7e6e5b1df0321d1)

Author SHA1 Message Date
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
Mitchell Hashimoto c2137360f4
update nix to 23.05 (#250)
* update nix to 23.05

* nix: do not install gdb on macos
2023-08-08 09:01:47 -07:00
Mitchell Hashimoto c9f486be9b
Revert "update nix to 23.05"
This reverts commit fe65764832.
2023-07-03 14:51:08 -07:00
Mitchell Hashimoto fe65764832
update nix to 23.05 2023-07-03 14:36:46 -07:00
Mitchell Hashimoto 67f8c231f8
update nixpkgs to 22.11 2022-11-29 14:44:56 -08:00
Mitchell Hashimoto 8e1e8cfc51
pin new zig-overlay repo 2022-08-23 10:23:02 -07:00
Mitchell Hashimoto 23548852c6
update to nixpkgs 22.05 2022-07-26 14:40:57 -07:00
Mitchell Hashimoto 702f54a6fa
first attempt at a derivation 2022-07-26 11:38:54 -07:00
Mitchell Hashimoto a87c2c36df
pin tracy to latest 2022-05-17 12:13:33 -07:00
Mitchell Hashimoto 9d1aaae0f4
lock to a release branch of nixpkgs 2022-05-17 12:11:50 -07:00
Mitchell Hashimoto f8b0000444
Initial 2022-03-29 09:06:39 -07:00