···337337338338 config = {
339339 _module.args = {
340340- pkgs = finalPkgs.__splicedPackages;
340340+ pkgs =
341341+ # We explicitly set the default override priority, so that we do not need
342342+ # to evaluate finalPkgs in case an override is placed on `_module.args.pkgs`.
343343+ # After all, to determine a definition priority, we need to evaluate `._type`,
344344+ # which is somewhat costly for Nixpkgs. With an explicit priority, we only
345345+ # evaluate the wrapper to find out that the priority is lower, and then we
346346+ # don't need to evaluate `finalPkgs`.
347347+ lib.mkOverride lib.modules.defaultOverridePriority
348348+ finalPkgs.__splicedPackages;
341349 };
342350343351 assertions = [