No description
  • Zig 69.4%
  • Nix 30.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jeffrey C. Ollie 7b0ccf30b8
All checks were successful
test / test (push) Successful in 14m58s
README: list the Tangled and Radicle mirrors
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AFs1WgXzf6dcNA26rYWZSR
2026-10-04 00:48:05 -05:00
.forgejo/workflows refresh README and replace the REUSE-only workflow 2026-10-03 22:45:36 -05:00
assets RiiZ 2025-08-27 22:39:24 -05:00
LICENSES Update to Zig 0.16 2026-02-08 16:55:26 -06:00
src find the cache directory with known-folders 2026-10-03 23:31:47 -05:00
.gitignore Update to Zig 0.16 2026-02-08 16:55:26 -06:00
.pinact.yaml fix missing spdx headers 2026-02-08 17:28:14 -06:00
build.zig find the cache directory with known-folders 2026-10-03 23:31:47 -05:00
build.zig.zon find the cache directory with known-folders 2026-10-03 23:31:47 -05:00
build.zig.zon.nix find the cache directory with known-folders 2026-10-03 23:31:47 -05:00
flake.lock find the cache directory with known-folders 2026-10-03 23:31:47 -05:00
flake.nix find the cache directory with known-folders 2026-10-03 23:31:47 -05:00
LICENSE first 2025-08-27 16:02:51 -05:00
package.nix find the cache directory with known-folders 2026-10-03 23:31:47 -05:00
README.md README: list the Tangled and Radicle mirrors 2026-10-04 00:48:05 -05:00
REUSE.toml find the cache directory with known-folders 2026-10-03 23:31:47 -05:00

nix-track-pr

A command-line tool that follows nixpkgs pull requests through the branches they flow into, showing which branches and channels each merged pull request has reached so far.

Screenshot of nix-track-pr in action

Usage

$ nix-track-pr 400000 '#401234'

Give it one or more pull request numbers, with or without a leading #. --version prints the version.

For each pull request, gh pr view supplies the title, the state, the base branch and the merge commit. The base branch decides which branches are checked, following the branch conventions in the nixpkgs contributing guide:

Base branch Branches checked
master master, nixos-unstable-small, nixpkgs-unstable, nixos-unstable
staging-next staging-next, then everything master gets
staging staging, staging-next, then everything master gets
release-YY.MM release-YY.MM, nixpkgs-YY.MM-darwin, nixos-YY.MM-small, nixos-YY.MM

Those branches are fetched into a local bare clone of nixpkgs, and git merge-base --is-ancestor decides whether each one contains the merge commit. The results are drawn as a table, one block per pull request.

Requirements

gh and git must be available. gh must be logged in, since it talks to the GitHub API. Build options set the paths to both programs (-Dgh= and -Dgit=); the Nix package points them at the store paths, so it needs nothing on PATH.

The first run makes a bare clone of nixpkgs, which takes around 6 GB of disk space and many minutes. Later runs only fetch the branches they need, which is quick unless it has been a long time since the last run.

Cache directory

The clone lives in nix-track-pr/nixpkgs inside the platform's cache directory, which known-folders finds:

Platform Cache directory
Linux and other Unix $XDG_CACHE_HOME, or ~/.cache if that is not set
macOS ~/Library/Caches
Windows %LOCALAPPDATA%

The directory is created if it does not exist.

Building

The project is written in Zig 0.17. Nixpkgs does not package that version yet, so the flake takes the release build from zig-overlay. The flake builds for x86_64-linux, aarch64-linux and aarch64-darwin, the systems the overlay packages.

$ nix build                              # the package, in ./result
$ nix develop -c zig build               # a debug build, in ./zig-out
$ nix develop -c zig build test          # the tests

The Nix build has no network, so the Zig dependencies are fetched by Nix from build.zig.zon.nix, which zon2nix generates from build.zig.zon. Regenerate it whenever a dependency changes:

$ nix develop -c zon2nix --17 --nix=build.zig.zon.nix build.zig.zon

The last version that builds with Zig 0.16 is tagged v0.3.0, and lives on the zig-0.16 branch.

Where this lives

The repository lives in three places that carry the same history. The Forgejo instance at https://git.jcollie.dev/jeff/nix-track-pr is the web-visible one:

$ git clone https://git.jcollie.dev/jeff/nix-track-pr.git

it is mirrored on Tangled at https://tangled.org/jcollie.dev/nix-track-pr, and it is also on the Radicle network, where the repository's identifier is

rad:z2qXwUZNDW57q9KahiRR9KnXSRmSb

and rad clone rad:z2qXwUZNDW57q9KahiRR9KnXSRmSb fetches it from any node that seeds it. Any of the three is the whole project.

License

MIT. The project follows the REUSE specification, and reuse lint passes.

References cited