rust-hypervisor-firmware: make assert lazy

The assert should not block `meta.platforms` checks from taking effect.
Throwing lazily will allow CI to filter out the package on unsupported
platforms *before* hitting the assert and avoids hacky workarounds.
This commit is contained in:
Wolfgang Walther
2025-07-20 13:50:45 +02:00
parent cc1dd948dd
commit 4fac508739
@@ -12,14 +12,14 @@ let
in
assert lib.assertMsg (builtins.pathExists target) "Target spec not found";
let
cross = import ../../../.. {
system = stdenv.hostPlatform.system;
crossSystem = lib.systems.examples."${arch}-embedded" // {
rust.rustcTarget = "${arch}-unknown-none";
rust.platform = lib.importJSON target;
rust.platform =
assert lib.assertMsg (builtins.pathExists target) "Target spec not found";
lib.importJSON target;
};
};