eval.nix: Ignore typed allowAliases config when checking unoverridden config keys

This was added in NixOS/nixpkgs#166792.

Fixes #74.
This commit is contained in:
Zhaofeng Li 2022-04-25 00:03:57 -07:00
parent 879e49a455
commit 6a64625fda

View file

@ -416,7 +416,7 @@ let
# meta.nixpkgs are overridden. # meta.nixpkgs are overridden.
warnings = let warnings = let
metaKeys = attrNames npkgs.config; metaKeys = attrNames npkgs.config;
nodeKeys = [ "doCheckByDefault" "warnings" ] ++ (attrNames config.nixpkgs.config); nodeKeys = [ "doCheckByDefault" "warnings" "allowAliases" ] ++ (attrNames config.nixpkgs.config);
remainingKeys = filter (k: ! elem k nodeKeys) metaKeys; remainingKeys = filter (k: ! elem k nodeKeys) metaKeys;
in in
lib.optional (length remainingKeys != 0) lib.optional (length remainingKeys != 0)