Skip to content

NPV 103

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

NPV-103: Cannot determine attribute location

Description

nixpkgs-vet uses builtins.unsafeGetAttrPos to determine where a package attribute is defined. If this fails, the tool cannot verify that the attribute is defined correctly.

Error message

pkgs.{attribute_name}: Cannot determine the location of this attribute using `builtins.unsafeGetAttrPos`.

Example

If pkgs.foo exists in pkgs/by-name/fo/foo/ but its definition location cannot be resolved:

pkgs.foo: Cannot determine the location of this attribute using `builtins.unsafeGetAttrPos`.

How to fix

Ensure the attribute is defined using standard Nix syntax (e.g., foo = callPackage ... { };). Dynamically generated attributes or those created through non-standard means may not be locatable by builtins.unsafeGetAttrPos.

Clone this wiki locally