-
-
Notifications
You must be signed in to change notification settings - Fork 21
Home
Michael Daniels edited this page Apr 16, 2026
·
13 revisions
This repository implements a program which checks Nixpkgs for many sorts of defects, both major and minor. It's named nixpkgs-vet, since it 'vets' contributions to Nixpkgs.
It implements all checks for Nixpkgs' pkgs/by-name directory as part of RFC 140.
These checks verify that attributes defined via pkgs/by-name are correct.
| Code | Description |
|---|---|
| NPV-100 | By-name attribute is undefined |
| NPV-101 | By-name attribute is not a derivation |
| NPV-102 | Manual use of _internalCallByNamePackageFile
|
| NPV-103 | Cannot determine attribute location |
| NPV-104 | Non-syntactic override of by-name package |
| NPV-105 | Override uses wrong callPackage variant |
| NPV-106 | Override has wrong callPackage path |
| NPV-107 | Override has empty second argument |
| NPV-108 | Override first argument is not a path |
| NPV-109 | Shard is not a directory |
| NPV-110 | Invalid shard directory name |
| NPV-111 | Case-sensitive duplicate package directories |
These checks verify that Nix files in pkgs/by-name packages don't reference paths outside their package directory.
| Code | Description |
|---|---|
| NPV-120 | Nix evaluation error |
| NPV-121 | Path interpolation in Nix file |
| NPV-122 | Nix search path expression in Nix file |
| NPV-123 | Path expression points outside package directory |
| NPV-124 | Unresolvable path expression in Nix file |
| NPV-125 | Symlink points outside package directory |
| NPV-126 | Unresolvable symlink in package directory |
| NPV-127 | Absolute path expression in Nix file |
| NPV-128 | Home-relative path expression in Nix file |
These checks verify that pkgs/by-name package directories have the correct structure.
| Code | Description |
|---|---|
| NPV-140 | Package directory is a file |
| NPV-141 | Invalid package directory name |
| NPV-142 | Package in wrong shard |
| NPV-143 | Missing package.nix
|
| NPV-144 |
package.nix is not a file |
| NPV-145 | Nix file is executable but has no shebang |
| NPV-146 | Nix file a has shebang but is not executable |
These checks enforce that top-level packages use pkgs/by-name when appropriate.
| Code | Description |
|---|---|
| NPV-160 | Top-level package moved out of pkgs/by-name
|
| NPV-161 | Top-level package moved out of pkgs/by-name with custom arguments |
| NPV-162 | New top-level package should be in pkgs/by-name
|
| NPV-163 | New top-level package should be in pkgs/by-name (with custom arguments) |
These checks discourage Nix language and Nixpkgs patterns that harm readability or functionality, or that break static analysis.
| Code | Description |
|---|---|
| NPV-164 |
strictDeps must evaluate to true for new packages |
| NPV-165 |
strictDeps must not regress from true to false
|
| NPV-166 |
__structuredAttrs must evaluate to true for new packages |
| NPV-167 |
__structuredAttrs must not regress from true to false
|
| NPV-168 | reserved |
| NPV-169 | Top-level with expression may shadow variables |
| NPV-170 | Useless escape sequences are not allowed |