Skip to content

NPV 125

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

NPV-125: Symlink points outside package directory

Description

Symlinks within a pkgs/by-name package directory must not point to targets outside that package directory. This ensures packages are self-contained.

Error message

{relative_package_dir}: Path {subpath} is a symlink pointing to a path outside the directory of that package.

Example

If pkgs/by-name/fo/foo/package.nix is a symlink pointing to ../../../some-other-package/package.nix:

pkgs/by-name/fo/foo: Path package.nix is a symlink pointing to a path outside the directory of that package.

How to fix

Replace the symlink with the actual file content, or restructure to avoid cross-package symlinks. If the file needs to be shared, consider the approaches described in NPV-123.

Clone this wiki locally