Unverified Commit 948fd41c authored by Bernardo Meurer's avatar Bernardo Meurer Committed by GitHub
Browse files

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

parents 87f8bb7a 5d663a91
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -358,7 +358,7 @@ in
            else "nixpkgs.localSystem";
          pkgsSystem = finalPkgs.stdenv.targetPlatform.system;
        in {
          assertion = !hasPlatform -> nixosExpectedSystem == pkgsSystem;
          assertion = constructedByMe -> !hasPlatform -> nixosExpectedSystem == pkgsSystem;
          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.";
        }
      )