stdenv: Use lib.systems.equals to compare systems (#567846)

This commit is contained in:
Winter
2026-09-28 12:08:51 +00:00
committed by GitHub
2 changed files with 5 additions and 5 deletions

View File

@@ -118,16 +118,16 @@ let
pkgsBuildBuild = prevStage.buildPackages;
pkgsBuildHost = prevStage;
pkgsBuildTarget =
if args.stdenv.targetPlatform == args.stdenv.hostPlatform then
if lib.systems.equals args.stdenv.targetPlatform args.stdenv.hostPlatform then
pkgsBuildHost
else
assert args.stdenv.hostPlatform == args.stdenv.buildPlatform;
assert lib.systems.equals args.stdenv.hostPlatform args.stdenv.buildPlatform;
thisStage;
pkgsHostHost =
if args.stdenv.hostPlatform == args.stdenv.targetPlatform then
if lib.systems.equals args.stdenv.hostPlatform args.stdenv.targetPlatform then
thisStage
else
assert args.stdenv.buildPlatform == args.stdenv.hostPlatform;
assert lib.systems.equals args.stdenv.buildPlatform args.stdenv.hostPlatform;
pkgsBuildHost;
pkgsTargetTarget = nextStage;
};

View File

@@ -16,7 +16,7 @@
}:
let
useCrossStdenv = crossSystem != localSystem || crossOverlays != [ ];
useCrossStdenv = !(lib.systems.equals crossSystem localSystem) || crossOverlays != [ ];
useCustomStdenv = !useCrossStdenv && (config.replaceStdenv or null) != null;
# Cross and custom stdenvs extend the local bootstrap stages. Keep