From 97975bed0221b12a99177c8107c6a59d5f72023b Mon Sep 17 00:00:00 2001 From: Kamen Mladenov Date: Fri, 21 Feb 2025 10:35:38 +0200 Subject: feat(zkvmLib): Ability to add an extra Cargo.lock Adds the ability to specify an `extraLockfile` attribute in args. Its value should evaluate to a string path. It's included in the beginning, so it overshadows dependencies, which are specified in the other Cargo.lock files. Must be added to commonArgs (i.e. to both `buildDepsOnly` and `buildPackage` args). --- zkvmLib.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'zkvmLib.nix') diff --git a/zkvmLib.nix b/zkvmLib.nix index cd92d5a..8c6f262 100644 --- a/zkvmLib.nix +++ b/zkvmLib.nix @@ -68,7 +68,13 @@ pkgs: guest: let mkdir -p "$out" cd zkvms/${args.pname} + '' + (if args ? extraLockfile then '' + cat ${args.extraLockfile} > lockfile + tail -n +4 ./host/Cargo.lock >> lockfile + '' else '' cat ./host/Cargo.lock > lockfile + '') + '' + tail -n +4 ./guest/Cargo.lock >> lockfile tail -n +4 ../../guests/${guest}/Cargo.lock >> lockfile -- cgit v1.2.3