-
-
Notifications
You must be signed in to change notification settings - Fork 14
NPV 121
Philip Taron edited this page Feb 16, 2026
·
1 revision
Nix files under pkgs/by-name must not contain path expressions with interpolations (e.g., ./${"foo"}). These are not yet fully supported by the checker and may resolve to paths outside the package directory.
{relative_package_dir}: File {subpath} at line {line} contains the path expression "{text}", which is not yet supported and may point outside the directory of that package.
Given pkgs/by-name/aa/aa/package.nix:
{ someDrv }: someDrv // { pathWithSubexpr = ./${"test"}; }The error is:
pkgs/by-name/aa/aa: File package.nix at line 1 contains the path expression "./${"test"}", which is not yet supported and may point outside the directory of that package.
Avoid path interpolations in package.nix. Instead, use string interpolation or pass the path as a callPackage argument.