diff --git a/pkgs/top-level/stage.nix b/pkgs/top-level/stage.nix index 926a132a3805e..12d3b9315e9a5 100644 --- a/pkgs/top-level/stage.nix +++ b/pkgs/top-level/stage.nix @@ -186,7 +186,11 @@ let overlays ; } res self super; + + conflictingAttrs = lib.intersectAttrs res super; in + assert lib.assertMsg (conflictingAttrs == { }) + "The following attributes were defined both in `pkgs/top-level/all-packages.nix` and elsewhere, most likely in `pkgs/by-name/`: ${lib.concatStringsSep ", " (lib.attrNames conflictingAttrs)}"; res; aliases = self: super: lib.optionalAttrs config.allowAliases (import ./aliases.nix lib self super);