Partially revert 755e824

Reinstates the error message that helps migration of forks.
Same should be done for super *if* it is to be removed.
This commit is contained in:
Robert Hensing 2019-02-03 18:22:22 +07:00
parent bd0bb9e497
commit 055ac8e495
2 changed files with 19 additions and 2 deletions

View File

@ -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;

View File

@ -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);