Nix flake for the Zig compiler.
Find a file
Mitchell Hashimoto de6bcff2cf
update README
2022-08-22 19:10:14 -07:00
.github/workflows Initial commit based on original arqv repository 2022-08-22 15:56:44 -07:00
.gitignore rewrite update script from scratch to use curl/jq 2022-08-22 17:38:53 -07:00
default.nix rewritten default.nix/flake.nix 2022-08-22 19:08:03 -07:00
flake.lock Initial commit based on original arqv repository 2022-08-22 15:56:44 -07:00
flake.nix rewritten default.nix/flake.nix 2022-08-22 19:08:03 -07:00
LICENSE Create LICENSE 2022-08-22 17:54:45 -07:00
README.md update README 2022-08-22 19:10:14 -07:00
sources.json rewrite update script from scratch to use curl/jq 2022-08-22 17:38:53 -07:00
update update should exit on error 2022-08-22 17:54:16 -07: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.<date> for a nightly release
  • packages.master.latest for the latest nightly release

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 master version dated 2021-02-13 (oldest version available)
$ nix shell 'github:mitchellh/zig-overlay#master."2021-02-13"'
# open a shell with latest master version
$ nix shell 'github:mitchellh/zig-overlay#master.latest'

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.