Skip to content

erikarvstedt/nix-zig-build

Folders and files

NameName
Last commit message
Last commit date

Latest commit

26e2767 · Apr 24, 2025
Jan 3, 2024
Sep 25, 2024
Jan 19, 2024
Apr 18, 2024
Apr 24, 2025
Jan 19, 2024
Jul 7, 2024
Jan 19, 2024
Jul 5, 2024
Apr 24, 2025
Apr 24, 2025

Repository files navigation

A Nix Flake for developing Zig.

Features

  • A Nix dev shell for building Zig from src
    # Start dev shell
    nix develop .
  • An opinionated script (./run) that helps with building and testing Zig
    ./run buildBootstrap # Build stage3
    ./run usePrebuilt # Alternatively, use a signature-checked stage3 binary from ziglang.org
    ./run buildDebug # Use stage3 to create a Zig debug build
    ./run testBehavior # Run behavior tests for the debug build
    Getting from zero to a self-built Zig is really fast:
    ./run usePrebuilt && ./run buildDebug takes less than 3 minutes on an average desktop system.
  • Zig master pkgs
    nix build .#zig # Built from source
    nix build .#zigPrebuilt # Prebuilt static binary from ziglang.org

This repo is regularly updated to track Zig master.

Usage

See ./usage.sh on how to use this repo.

Dev

See ./dev/README.md on how to develop and contribute to this repo.

See also

zig-overlay, which packages the official prebuilt static Zig binaries with Nix.
zig2nix, Flake for packaging, building and running Zig projects.

About

A Nix Flake for developing Zig

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published