Skip to content

Latest commit

 

History

History
58 lines (49 loc) · 1.38 KB

README.md

File metadata and controls

58 lines (49 loc) · 1.38 KB

Testing

A quick test that covers most features (<3 min. runtime).

./test.sh test_quick

Tests run by CI. You should run this before making a Pull Request.

./test.sh test_ci

Test all features.

./test.sh test_all

Fetching a new Zig release

This updates ../zig-release.nix.

./update.sh

Don't make any persistent changes.

./update.sh --dry-run|-n

Maintaining this repo

  1. Get commit rights for https://github.com/erikarvstedt/nix-zig-build and add remote upstream:

    git remote add upstream [email protected]:erikarvstedt/nix-zig-build.git

    Also, always GPG-sign commits:

    git config commit.gpgsign true
  2. Regularly run the update script to update ../zig-release.nix and push it to upstream:

    ./update.sh --push

    You can also add a NixOS service to auto run the update daily.
    Make sure to check and edit all locations marked by FIXME:.

    systemd.services.update-nix-zig-build = {
      serviceConfig = {
        User = "<FIXME: The unprivileged system user that should run `update.sh`>";
        ExecStart = ''
          ${pkgs.bash}/bin/bash -c \
            'source ${config.system.build.setEnvironment}; exec <FIXME: Path to the nix-zig-build repo>/dev/update.sh --push'
        '';
      };
      startAt = "*-*-* 16:00:00";
    };