-
-
Notifications
You must be signed in to change notification settings - Fork 15
NPV 107
Philip Taron edited this page Feb 16, 2026
·
1 revision
When a pkgs/by-name package is overridden in all-packages.nix with callPackage ./path { } (an empty second argument), the override is redundant. The auto-calling mechanism already provides exactly this definition.
Because {relative_package_dir} exists, the attribute `pkgs.{package_name}` must be defined like
{package_name} = callPackage {expected_path_expr} { /* ... */ };
However, in this PR, the second argument is empty. See the definition in {file}:{line}:
{definition}
Such a definition is provided automatically and therefore not necessary. Please remove it.
Given pkgs/by-name/no/nonDerivation/package.nix exists, and pkgs/top-level/all-packages.nix contains:
self: super: { nonDerivation = self.callPackage ./../by-name/no/nonDerivation/package.nix { }; }The error is:
Because pkgs/by-name/no/nonDerivation exists, the attribute `pkgs.nonDerivation` must be defined like
nonDerivation = callPackage ./../by-name/no/nonDerivation/package.nix { /* ... */ };
However, in this PR, the second argument is empty. See the definition in pkgs/top-level/all-packages.nix:1:
nonDerivation = self.callPackage ./../by-name/no/nonDerivation/package.nix { };
Such a definition is provided automatically and therefore not necessary. Please remove it.
Remove the manual definition from all-packages.nix. Since the second argument is empty ({ }), the auto-call mechanism will provide the exact same definition.