nixos/nixpkgs.nix: Fix assertion when nixpkgs.pkgs is set
This commit is contained in:
@@ -358,7 +358,7 @@ in
|
|||||||
else "nixpkgs.localSystem";
|
else "nixpkgs.localSystem";
|
||||||
pkgsSystem = finalPkgs.stdenv.targetPlatform.system;
|
pkgsSystem = finalPkgs.stdenv.targetPlatform.system;
|
||||||
in {
|
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.";
|
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.";
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user