From adbb635ff67015805f4dc2ff61e6613b6324d888 Mon Sep 17 00:00:00 2001 From: ThetaSinner Date: Tue, 4 Jun 2024 14:34:41 +0100 Subject: [PATCH] Support no happs required --- nix/modules/happs.nix | 4 ++++ nix/modules/scenario.nix | 2 +- scenarios/remote_call/Cargo.toml | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/nix/modules/happs.nix b/nix/modules/happs.nix index aa565f62..4d2cc7cb 100644 --- a/nix/modules/happs.nix +++ b/nix/modules/happs.nix @@ -162,6 +162,10 @@ ]; postInstall = '' + # Ensure the derivation is not empty if there are ne hApps requested + mkdir -p $out + touch $out/.happ-build + ${mkDnaBuildScripts (map mkDnaManifest requiredDnas)} ${mkHappBuildScripts (map mkHappManifest requiredHapps)} ''; diff --git a/nix/modules/scenario.nix b/nix/modules/scenario.nix index ff59ce9a..2d859c6f 100644 --- a/nix/modules/scenario.nix +++ b/nix/modules/scenario.nix @@ -43,7 +43,7 @@ cp "${scenarioBinary}/bin/${name}" $out/bin/ mkdir -p $out/happs - cp ${scenarioHapps}/*.happ $out/happs + cp ${scenarioHapps}/.happ-build ${scenarioHapps}/*.happ $out/happs ''; }; }; diff --git a/scenarios/remote_call/Cargo.toml b/scenarios/remote_call/Cargo.toml index 4868e50f..68fb61c0 100644 --- a/scenarios/remote_call/Cargo.toml +++ b/scenarios/remote_call/Cargo.toml @@ -14,3 +14,5 @@ happ_builder = { workspace = true } [lints] workspace = true + +[package.metadata]