diff options
-rw-r--r-- | pkgs/top-level/all-packages.nix | 16 | ||||
-rw-r--r-- | pkgs/top-level/stage.nix | 5 |
2 files changed, 19 insertions, 2 deletions
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index adf7e603b23..01dccadd3b9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6,11 +6,25 @@ * Hint: ### starts category names. */ { lib, noSysDirs, config}: -pkgs: +res: pkgs: super: with pkgs; +let + self = + builtins.trace '' + It seems that you are using a patched Nixpkgs that references the self + variable in pkgs/top-level/all-packages.nix. This variable was incorrectly + named, so its usage needs attention. Please use pkgs for packages or super + for functions. + '' + res; # Do *NOT* use res in your fork. It will be removed. + + # TODO: turn self into an error + +in { + # Allow callPackage to fill in the pkgs argument inherit pkgs; diff --git a/pkgs/top-level/stage.nix b/pkgs/top-level/stage.nix index 0991c9138bd..6ca370e0b9b 100644 --- a/pkgs/top-level/stage.nix +++ b/pkgs/top-level/stage.nix @@ -89,7 +89,10 @@ let splice = self: super: import ./splice.nix lib self (buildPackages != null); allPackages = self: super: - import ./all-packages.nix { inherit lib noSysDirs config; } self; + let res = import ./all-packages.nix + { inherit lib noSysDirs config; } + res self super; + in res; aliases = self: super: lib.optionalAttrs (config.allowAliases or true) (import ./aliases.nix lib self super); |