1
0
Fork
You've already forked zig-overlay
0
No description
  • Nix 75.4%
  • Shell 24.6%
2026年06月03日 00:28:37 +00:00
.forgejo/workflows run cron more often 2026年02月10日 17:02:29 -06:00
LICENSES meet reuse spec and misc cleanup 2026年02月09日 10:58:08 -06:00
.gitignore meet reuse spec and misc cleanup 2026年02月09日 10:58:08 -06:00
.pinact.yaml meet reuse spec and misc cleanup 2026年02月09日 10:58:08 -06:00
bintools.nix meet reuse spec and misc cleanup 2026年02月09日 10:58:08 -06:00
cc.nix meet reuse spec and misc cleanup 2026年02月09日 10:58:08 -06:00
default.nix meet reuse spec and misc cleanup 2026年02月09日 10:58:08 -06:00
fetcher.nix meet reuse spec and misc cleanup 2026年02月09日 10:58:08 -06:00
flake.lock remove flake-utils and flake-compat 2026年01月31日 14:53:51 -06:00
flake.nix meet reuse spec and misc cleanup 2026年02月09日 10:58:08 -06:00
LICENSE Create LICENSE 2022年08月22日 17:54:45 -07:00
mirrors.json update sources.json 2026年05月07日 20:12:33 +00:00
package.nix meet reuse spec and misc cleanup 2026年02月09日 10:58:08 -06:00
passthru.nix meet reuse spec and misc cleanup 2026年02月09日 10:58:08 -06:00
README.md meet reuse spec and misc cleanup 2026年02月09日 10:58:08 -06:00
REUSE.toml meet reuse spec and misc cleanup 2026年02月09日 10:58:08 -06:00
setup-hook.sh meet reuse spec and misc cleanup 2026年02月09日 10:58:08 -06:00
sources.json update sources.json 2026年06月03日 00:28:37 +00:00
update temp disable verification of index.json 2026年04月14日 18:21:19 -05:00

Nix Flake for Zig

This repository is a Nix flake packaging the Zig compiler. The flake mirrors the binaries built officially by Zig and does not build them from source.

This repository is meant to be consumed primarily as a flake but the default.nix can also be imported directly by non-flakes, too.

The flake outputs are documented in flake.nix but an overview:

  • Default package and "app" is the latest released version
  • packages.<version> for a tagged release
  • packages.master for the latest nightly release
  • packages.master-<date> for a nightly release

Usage

Flake

In your flake.nix file:

{
 inputs.zig.url = "git+https://git.ocjtech.us/jeff/zig-overlay.git";
 outputs = { self, zig, ... }: {
 ...
 };
}

In a shell:

# run the latest released version
$ nix run 'github:mitchellh/zig-overlay'
# open a shell with nightly version dated 2021年02月13日 (oldest version available)
$ nix shell 'github:mitchellh/zig-overlay#master-2021年02月13日'
# open a shell with latest nightly version
$ nix shell 'github:mitchellh/zig-overlay#master'
# open a shell with a specific zig version
$ nix shell 'github:mitchellh/zig-overlay#"0.14.0"'

FAQ

Why is a Nightly Missing?

There are two possible reasons:

  1. The Zig download JSON that is used to generate this overlay only shows the latest master release. It doesn't keep track of historical releases. If this overlay wasn't running or didn't exist at the time of a release, we could miss a day. This is why historical dates beyond a certain point don't exist; they predate this overlay (or original overlays this derives from).

  2. The official Zig CI only generates a master release if the CI runs full green. During certain periods of development, a full day may go by where the master branch of the Zig compiler is broken. In this scenario, a master build (aka "nightly") is not built or released at all.

Thanks

The sources.json file was originally from another Zig overlay repository hosted by the username arqv. This user and repository was deleted at some point, so I started a new flake based on the same sources.json format they used so I could inherit the history. Thank you for compiling nightly release information since 2021!