Unverified Commit 4fac5087 authored by Wolfgang Walther's avatar Wolfgang Walther
Browse files

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.
parent cc1dd948
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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;
    };
  };