Merge pull request #198056 from hercules-ci/nixos-fix-nixpkgs-assertion-when-pkgs-is-set

authored by Bernardo Meurer and committed by GitHub 948fd41c 87f8bb7a

+1 -1
+1 -1
nixos/modules/misc/nixpkgs.nix
··· 358 358 else "nixpkgs.localSystem"; 359 359 pkgsSystem = finalPkgs.stdenv.targetPlatform.system; 360 360 in { 361 - assertion = !hasPlatform -> nixosExpectedSystem == pkgsSystem; 361 + assertion = constructedByMe -> !hasPlatform -> nixosExpectedSystem == pkgsSystem; 362 362 message = "The NixOS nixpkgs.pkgs option was set to a Nixpkgs invocation that compiles to target system ${pkgsSystem} but NixOS was configured for system ${nixosExpectedSystem} via NixOS option ${nixosOption}. The NixOS system settings must match the Nixpkgs target system."; 363 363 } 364 364 )