Skip to content

NPV 144

Philip Taron edited this page Feb 16, 2026 · 1 revision

NPV-144: package.nix is not a file

Description

The package.nix entry in a pkgs/by-name package directory must be a regular file, not a directory or other filesystem object.

Error message

{relative_package_dir}: "package.nix" must be a file.

Example

If pkgs/by-name/fo/foo/package.nix is a directory instead of a file:

pkgs/by-name/fo/foo: "package.nix" must be a file.

How to fix

Remove the directory named package.nix and replace it with a regular file containing the package definition.

Clone this wiki locally