File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5555 description = "An evaluation of Nixpkgs; the top level attribute set of packages" ;
5656 } ;
5757
58- # Whether `pkgs` was constructed by this module - not if nixpkgs.pkgs or
59- # _module.args.pkgs is set. However, determining whether _module.args.pkgs
60- # is defined elsewhere does not seem feasible.
61- constructedByMe = ! opt . pkgs . isDefined ;
62-
6358 hasBuildPlatform = opt . buildPlatform . highestPrio < ( mkOptionDefault { } ) . priority ;
6459 hasHostPlatform = opt . hostPlatform . isDefined ;
6560 hasPlatform = hasHostPlatform || hasBuildPlatform ;
348343 finalPkgs . __splicedPackages ;
349344 } ;
350345
351- assertions = [
346+ assertions = let
347+ # Whether `pkgs` was constructed by this module. This is false when any of
348+ # nixpkgs.pkgs or _module.args.pkgs is set.
349+ constructedByMe =
350+ # We set it with default priority and it can not be merged, so if the
351+ # pkgs module argument has that priority, it's from us.
352+ ( lib . modules . mergeAttrDefinitionsWithPrio options . _module . args ) . pkgs . highestPrio
353+ == lib . modules . defaultOverridePriority
354+ # Although, if nixpkgs.pkgs is set, we did forward it, but we did not construct it.
355+ && ! opt . pkgs . isDefined ;
356+ in [
352357 (
353358 let
354359 nixosExpectedSystem =
You can’t perform that action at this time.
0 commit comments