From 6c0952ff7260195a5f1e4db493440647c02927da Mon Sep 17 00:00:00 2001 From: Kamen Mladenov Date: Tue, 28 Jan 2025 16:40:38 +0200 Subject: feat(flake): Move creating guest (zkp) symlink to a custom phase --- flake.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 942b49f..0c402c2 100644 --- a/flake.nix +++ b/flake.nix @@ -48,13 +48,20 @@ # - guest crate is located at zkvms/pname/guest and is named "guest" withCustomPhases = guest: currentPackage: let hostBin = currentPackage.hostBin or ("host-" + currentPackage.pname); + zkpPath = "zkvms/${currentPackage.pname}/guest/src/zkp"; in with currentPackage; { phases = [ - "unpackPhase" "patchPhase" "configurePhase" # Standard phases + "unpackPhase" # Standard phases + "linkGuest" # Custom phase + "patchPhase" "configurePhase" # Standard phases "buildGuestPhase" # Custom phase "buildPhase" "checkPhase" "installPhase" "fixupPhase" # Standard phases ]; + linkGuest = '' + ln -s ../../../../guests/${guest} ./${zkpPath} + ''; + buildGuestPhase = '' pushd zkvms/${currentPackage.pname}/guest runHook preBuildGuest -- cgit v1.2.3