Skip to content
Philip Taron edited this page Feb 16, 2026 · 8 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.

Index of checks

By-name attribute checks (NPV-100 – NPV-111)

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

Nix file and path checks (NPV-120 – NPV-128)

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

Package directory structure checks (NPV-140 – NPV-145)

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 without shebang

Top-level package migration checks (NPV-160 – NPV-163)

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)

Nix language style checks (NPV-169)

These checks discourage Nix language patterns that harm readability or break static analysis.

Code Description
NPV-169 Top-level with expression may shadow variables

Clone this wiki locally