mirror of
https://github.com/mitchellh/zig-overlay.git
synced 2025-02-05 08:52:48 +02:00
Nix flake for the Zig compiler.
.github | ||
templates/compiler-dev | ||
.gitignore | ||
default.nix | ||
flake.lock | ||
flake.nix | ||
LICENSE | ||
README.md | ||
sources.json | ||
update |
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 releasepackages.master
for the latest nightly releasepackages.master-<date>
for a nightly releaseoverlay
is an overlay that addszigpkgs
to be the packages exposed by this flake
Usage
Flake Support
In your flake.nix
file:
{
inputs.zig.url = "github:mitchellh/zig-overlay";
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'
Thanks
This repository is originally hosted by the username arqv
. This user
and repository disappeared at some point and I had a local checkout so
I've forked it, modified it, and reuploaded it here.