Unverified Commit e25f0098 authored by Michael Daniels's avatar Michael Daniels Committed by GitHub
Browse files

top-level/stage: assert no by-name overwrites (#483820)

parents e40de2c6 e07663a6
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -155,7 +155,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);