From 4fac5087390484b2b39895cc54b98d68c28475d0 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 20 Jul 2025 13:50:45 +0200 Subject: [PATCH] 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. --- .../virtualization/rust-hypervisor-firmware/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/virtualization/rust-hypervisor-firmware/default.nix b/pkgs/applications/virtualization/rust-hypervisor-firmware/default.nix index 749e6b46ec19..0a8c571f5394 100644 --- a/pkgs/applications/virtualization/rust-hypervisor-firmware/default.nix +++ b/pkgs/applications/virtualization/rust-hypervisor-firmware/default.nix @@ -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; }; };