← 返回命令列表

Linux command

nixpkgs-review 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Review pull request

nixpkgs-review pr [12345]

Review with local checkout

nixpkgs-review rev HEAD

Review specific commit

nixpkgs-review rev [abc123]

Review with post-build report

nixpkgs-review pr [12345] --post-result

Review allowing unfree packages

nixpkgs-review pr [12345] --allow-unfree

Review with specified number of cores

nixpkgs-review pr [12345] --build-args "-j [4]"

List failed builds

nixpkgs-review pr [12345] --print-result

说明

nixpkgs-review tests Nix package changes by building affected packages. It's essential for reviewing nixpkgs pull requests. For pull requests, the tool checks out the PR, identifies changed packages, and builds them. Build failures indicate problems that need fixing before merge. The review process compares the PR against the target branch. Only packages affected by changes are built, saving time on large contributions. Post-result mode comments on GitHub PRs with build outcomes. This provides automated feedback to contributors and reviewers. After builds complete, an interactive shell provides access to built packages for manual testing. Environment variables point to successful builds. The tool handles unfree packages, cross-compilation targets, and parallel builds through configuration.

参数

pr _NUMBER_
Review pull request by number.
rev _COMMIT_
Review specific revision.
wip
Review work in progress.
--post-result, -p
Post results to GitHub.
--allow-unfree
Build unfree packages.
--build-args _ARGS_
Arguments to pass to nix-build.
--print-result
Print build results.
--no-shell
Don't start shell after build.
-c _PATH_, --checkout _PATH_
Path to nixpkgs checkout.
--system _SYSTEM_
Target system.
--token _TOKEN_
GitHub token.

FAQ

What is the nixpkgs-review command used for?

nixpkgs-review tests Nix package changes by building affected packages. It's essential for reviewing nixpkgs pull requests. For pull requests, the tool checks out the PR, identifies changed packages, and builds them. Build failures indicate problems that need fixing before merge. The review process compares the PR against the target branch. Only packages affected by changes are built, saving time on large contributions. Post-result mode comments on GitHub PRs with build outcomes. This provides automated feedback to contributors and reviewers. After builds complete, an interactive shell provides access to built packages for manual testing. Environment variables point to successful builds. The tool handles unfree packages, cross-compilation targets, and parallel builds through configuration.

How do I run a basic nixpkgs-review example?

Run `nixpkgs-review pr [12345]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does pr _NUMBER_ do in nixpkgs-review?

Review pull request by number.